FS-10167 complile issues for mac sierra

This commit is contained in:
Anthony Minessale 2017-03-26 10:18:38 -04:00
parent f0afe29c9c
commit 5003c66406
3 changed files with 7 additions and 2 deletions

View File

@ -73,6 +73,10 @@
#endif /* WIN32 */
#ifndef SOL_IPV6
#define SOL_IPV6 41
#endif
#ifdef KS_USE_POLL
#include <poll.h>
#endif

View File

@ -46,7 +46,8 @@ KS_DECLARE(ks_pid_t) ks_thread_self_id(void)
#elif gettid
return gettid();
#else
return syscall(SYS_gettid);
return (ks_pid_t) pthread_self();
//return syscall(SYS_gettid);
#endif
}

View File

@ -243,7 +243,7 @@ KS_DECLARE(void) ks_sleep(ks_time_t microsec)
clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, NULL);
#elif defined(__APPLE__)
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);
#else
generic_sleep(microsec);