summaryrefslogtreecommitdiff
path: root/games/spring/files/patch-rts_System_Platform_Linux_ThreadSupport.cpp
blob: c3acda218cc85cca1e6848bf770e0995a42e5174 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- rts/System/Platform/Linux/ThreadSupport.cpp.orig	2021-01-01 16:12:22 UTC
+++ rts/System/Platform/Linux/ThreadSupport.cpp
@@ -7,6 +7,7 @@
 #include <csignal>
 #include <fstream>
 #include <sys/syscall.h>
+#include <pthread_np.h>
 
 #include "System/Log/ILog.h"
 #include "System/Platform/Threading.h"
@@ -42,7 +43,7 @@ enum LinuxThreadState {
  * There is no glibc wrapper for this system call, so you have to write one:
  */
 static int gettid() {
-	return syscall(SYS_gettid);
+	return pthread_getthreadid_np();
 }
 
 /**