From 0bb53f311cb9692ed84bb5fcecd34631ba1997a4 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Mon, 30 Jan 2023 09:48:30 +0100 Subject: Call gettid syscall directly as gettid() is not available in earlier glibc --- zencore/thread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'zencore/thread.cpp') 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 # include # include +# include # include # include # include @@ -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 -- cgit v1.2.3