]> mj.ucw.cz Git - libucw.git/commitdiff
Rename our gettid() wrapper to ucw_gettid()
authorMartin Mares <mj@ucw.cz>
Wed, 21 Jul 2021 20:16:18 +0000 (22:16 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 21 Jul 2021 20:16:18 +0000 (22:16 +0200)
Recent versions of glibc apparently supply gettid() in <unistd.h>,
which clashes with our definition.

ucw/threads.c

index d9100119f601210692f59e6c58b4704c4dac2a85..b66257148366b18df1272f6b6a98b65c0dec39f5 100644 (file)
@@ -20,7 +20,7 @@
 #include <unistd.h>
 #ifdef __NR_gettid
 static pid_t
-gettid(void)
+ucw_gettid(void)
 {
   return syscall(__NR_gettid);
 }
@@ -53,7 +53,7 @@ ucwlib_tid(void)
   int tid;
 
 #ifdef CONFIG_USE_GETTID
-  tid = gettid();
+  tid = ucw_gettid();
   if (tid > 0)
     return tid;
   /* The syscall might be unimplemented */