aboutsummaryrefslogtreecommitdiff
path: root/zencore/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zencore/thread.cpp')
-rw-r--r--zencore/thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp
index 77b75bae3..1597a7dd9 100644
--- a/zencore/thread.cpp
+++ b/zencore/thread.cpp
@@ -29,6 +29,7 @@
# include <sys/file.h>
# include <sys/sem.h>
# include <sys/stat.h>
+# include <sys/syscall.h>
# include <sys/wait.h>
# include <time.h>
# include <unistd.h>
@@ -1065,7 +1066,7 @@ GetCurrentThreadId()
#if ZEN_PLATFORM_WINDOWS
return ::GetCurrentThreadId();
#elif ZEN_PLATFORM_LINUX
- return int(gettid());
+ return int(syscall(SYS_gettid));
#elif ZEN_PLATFORM_MAC
return int(pthread_mach_thread_np(pthread_self()));
#endif