Recent versions of glibc apparently supply gettid() in <unistd.h>,
which clashes with our definition.
#include <unistd.h>
#ifdef __NR_gettid
static pid_t
#include <unistd.h>
#ifdef __NR_gettid
static pid_t
{
return syscall(__NR_gettid);
}
{
return syscall(__NR_gettid);
}
int tid;
#ifdef CONFIG_USE_GETTID
int tid;
#ifdef CONFIG_USE_GETTID
if (tid > 0)
return tid;
/* The syscall might be unimplemented */
if (tid > 0)
return tid;
/* The syscall might be unimplemented */