FS-10167 complile issues for mac sierra
This commit is contained in:
parent
f0afe29c9c
commit
5003c66406
|
@ -73,6 +73,10 @@
|
||||||
|
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
|
|
||||||
|
#ifndef SOL_IPV6
|
||||||
|
#define SOL_IPV6 41
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef KS_USE_POLL
|
#ifdef KS_USE_POLL
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,7 +46,8 @@ KS_DECLARE(ks_pid_t) ks_thread_self_id(void)
|
||||||
#elif gettid
|
#elif gettid
|
||||||
return gettid();
|
return gettid();
|
||||||
#else
|
#else
|
||||||
return syscall(SYS_gettid);
|
return (ks_pid_t) pthread_self();
|
||||||
|
//return syscall(SYS_gettid);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -243,7 +243,7 @@ KS_DECLARE(void) ks_sleep(ks_time_t microsec)
|
||||||
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
|
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
ts.tv_sec = ks_time_sec(microsec);
|
ts.tv_sec = ks_time_sec(microsec);
|
||||||
ts.tv_nsec = ks_time_usec(microsec) * 850;
|
ts.tv_nsec = ks_time_usec(microsec) * 900;
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, NULL);
|
||||||
#else
|
#else
|
||||||
generic_sleep(microsec);
|
generic_sleep(microsec);
|
||||||
|
|
Loading…
Reference in New Issue