File tree 2 files changed +26
-4
lines changed
2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,32 @@ if test $found = no; then
104
104
exit 1
105
105
fi
106
106
107
+ cat << EOF > conftest.c
108
+ #include <stdio.h>
109
+ #include <unistd.h>
110
+ #include <sys/syscall.h>
111
+
112
+ #ifndef SYS_gettid
113
+ #error "SYS_gettid unavailable on this system"
114
+ #endif
115
+
116
+ #define gettid() ((pid_t) syscall(SYS_gettid))
117
+
118
+ int main(void) {
119
+ return getpid() == gettid() ? 0 : -1;
120
+ }
121
+ EOF
122
+
123
+ # shellcheck disable=SC2086
124
+ ${CC} $CFLAGS $LDFLAGS conftest.c > /dev/null 2>&1
125
+ ret=$?
126
+ rm -f conftest.c a.out
127
+
128
+ if test $ret -ne 0; then
129
+ echo " dracut needs SYS_gettid support." >&2
130
+ exit 1
131
+ fi
132
+
107
133
if test " $enable_dracut_cpio " = " yes" ; then
108
134
cargo --version > /dev/null
109
135
ret=$?
Original file line number Diff line number Diff line change 28
28
29
29
#include "util.h"
30
30
31
- #ifndef SYS_gettid
32
- #error "SYS_gettid unavailable on this system"
33
- #endif
34
-
35
31
#define gettid () ((pid_t) syscall(SYS_gettid))
36
32
37
33
size_t page_size (void )
You can’t perform that action at this time.
0 commit comments