diff --git a/src/install/util.c b/src/install/util.c index bd17fe7f5d..5721de89ea 100644 --- a/src/install/util.c +++ b/src/install/util.c @@ -24,14 +24,17 @@ #include #include #include -#include #include "util.h" -static inline pid_t gettid(void) -{ - return (pid_t) syscall(SYS_gettid); -} +#if __GLIBC_PREREQ(2, 30) == 0 +#include +#ifndef SYS_gettid +#error "SYS_gettid unavailable on this system" +#endif + +#define gettid() ((pid_t) syscall(SYS_gettid)) +#endif /*__GLIBC_PREREQ */ size_t page_size(void) {