Split glib and version check
This commit is contained in:
parent
39b65b1e67
commit
add5872c9a
6
compat.h
6
compat.h
@ -30,11 +30,13 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
/* Define gettid for older glibc versions (below 2.30) */
|
/* 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)
|
static inline pid_t gettid(void)
|
||||||
{
|
{
|
||||||
return (pid_t)syscall(SYS_gettid);
|
return (pid_t)syscall(SYS_gettid);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !__GLIBC_PREREQ(2, 30) */
|
||||||
|
#endif /* defined(__GLIBC__) */
|
||||||
|
|
||||||
#endif // COMPAT_H
|
#endif // COMPAT_H
|
||||||
|
Loading…
Reference in New Issue
Block a user