Fixed issue with gettid() not available with glibc < 2.30.

In that case use the syscall interface directly

https://stackoverflow.com/questions/30680550/c-gettid-was-not-declared-in-this-scope
This commit is contained in:
pmcgleenon 2020-10-09 12:42:55 +01:00
parent 6ce839c554
commit 0401446561

View File

@ -18,6 +18,11 @@
#include "ccutil/log.h"
#include "ccutil/wrapped_array.h"
#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 30
#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif
// Workaround for missing hw_breakpoint.h include file:
// This include file just defines constants used to configure watchpoint registers.
// This will be constant across x86 systems.