neco.c:(.text+0x59b7): undefined reference to `gettid'
neco.c:(.text+0x80a7): undefined reference to `gettid'
collect2: error: ld returned 1 exit status
Because gettid has been provided since glibc 2.30, there are compilation errors on glibc < 2.30.
To support older glibc, following modification seems to be required.
Original:
#elif defined(__linux__) || defined(__EMSCRIPTEN__)
int gettid(void);
static int is_main_thread(void) {
return getpid() == gettid();
}
#else
I met compilation error on glibc 2.23.
Because
gettid
has been provided since glibc 2.30, there are compilation errors on glibc < 2.30. To support older glibc, following modification seems to be required.Original:
Try to support older glibc: