提交 5003c664 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-10167 complile issues for mac sierra

上级 f0afe29c
...@@ -73,6 +73,10 @@ ...@@ -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) ...@@ -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) ...@@ -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);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论