]> mj.ucw.cz Git - libucw.git/commitdiff
gettid: fixed a compilation bug on gentoo
authorPavel Charvat <pavel.charvat@netcentrum.cz>
Tue, 5 Jun 2007 11:45:13 +0000 (13:45 +0200)
committerPavel Charvat <pavel.charvat@netcentrum.cz>
Tue, 5 Jun 2007 11:45:13 +0000 (13:45 +0200)
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