Split glib and version check

This commit is contained in:
Rodrigo Arias 2022-01-11 19:08:37 +01:00
parent 39b65b1e67
commit add5872c9a

View File

@ -30,11 +30,13 @@
#include <unistd.h>
/* Define gettid for older glibc versions (below 2.30) */
#if defined(__GLIBC__) && !__GLIBC_PREREQ(2, 30)
#if defined(__GLIBC__)
#if !__GLIBC_PREREQ(2, 30)
static inline pid_t gettid(void)
{
return (pid_t)syscall(SYS_gettid);
}
#endif
#endif /* !__GLIBC_PREREQ(2, 30) */
#endif /* defined(__GLIBC__) */
#endif // COMPAT_H