We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19537f8 commit ef0f848Copy full SHA for ef0f848
src/install/util.c
@@ -24,14 +24,17 @@
24
#include <errno.h>
25
#include <fcntl.h>
26
#include <sys/types.h>
27
-#include <sys/syscall.h>
28
29
#include "util.h"
30
31
-static inline pid_t gettid(void)
32
-{
33
- return (pid_t) syscall(SYS_gettid);
34
-}
+#if __GLIBC_PREREQ(2, 30) == 0
+#include <sys/syscall.h>
+#ifndef SYS_gettid
+#error "SYS_gettid unavailable on this system"
+#endif
35
+
36
+#define gettid() ((pid_t) syscall(SYS_gettid))
37
+#endif /*__GLIBC_PREREQ */
38
39
size_t page_size(void)
40
{
0 commit comments