]> mj.ucw.cz Git - libucw.git/blobdiff - lib/threads.c
gettid: fixed a compilation bug on gentoo
[libucw.git] / lib / threads.c
index d2e0f220d769bce15c34935cb12ca259e8413cfe..c7497f95247f5dc2d6205d1d080686d1ad02b30f 100644 (file)
 
 #ifdef CONFIG_LINUX
 #include <sys/types.h>
-#include <linux/unistd.h>
+#include <sys/syscall.h>
+#include <unistd.h>
 #ifdef __NR_gettid
-static _syscall0(pid_t, gettid)
+static pid_t
+gettid(void)
+{
+  return syscall(__NR_gettid);
+}
 #define CONFIG_USE_GETTID
 #endif
 #endif