File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ if test "$PHP_PCNTL" != "no"; then
13
13
forkx
14
14
getcpuid
15
15
getpriority
16
- pidfd_open
17
16
pset_bind
18
17
pthread_set_qos_class_self_np
19
18
rfork
@@ -48,6 +47,9 @@ if test "$PHP_PCNTL" != "no"; then
48
47
AC_CHECK_DECLS ( [ SYS_waitid] ,,,
49
48
[ #include <sys/syscall.h>] )
50
49
50
+ AC_CHECK_DECLS ( [ SYS_pidfd_open] ,,,
51
+ [ #include <sys/syscall.h>] )
52
+
51
53
dnl if unsupported, -1 means automatically ENOSYS in this context
52
54
AC_CACHE_CHECK ( [ if sched_getcpu is supported] , [ php_cv_func_sched_getcpu] ,
53
55
[ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [
Original file line number Diff line number Diff line change @@ -125,18 +125,20 @@ typedef psetid_t cpu_set_t;
125
125
#include <pthread/qos.h>
126
126
#endif
127
127
128
- #if defined(__linux__ ) && defined(HAVE_DECL_SYS_WAITID ) && HAVE_DECL_SYS_WAITID == 1 && defined(HAVE_SYSCALL )
129
- #define HAVE_LINUX_RAW_SYSCALL_WAITID 1
128
+ #if defined(__linux__ ) && defined(HAVE_SYSCALL )
129
+ # include <sys/syscall.h>
130
+ # if defined(HAVE_DECL_SYS_WAITID ) && HAVE_DECL_SYS_WAITID == 1
131
+ # define HAVE_LINUX_RAW_SYSCALL_WAITID 1
132
+ # endif
133
+ # if defined(HAVE_DECL_SYS_PIDFD_OPEN ) && HAVE_DECL_SYS_PIDFD_OPEN == 1
134
+ # define HAVE_LINUX_RAW_SYSCALL_PIDFD_OPEN 1
135
+ # endif
130
136
#endif
131
137
132
138
#if defined(HAVE_LINUX_RAW_SYSCALL_WAITID )
133
139
#include <unistd.h>
134
140
#endif
135
141
136
- #if defined(HAVE_PIDFD_OPEN ) || defined(HAVE_LINUX_RAW_SYSCALL_WAITID )
137
- #include <sys/syscall.h>
138
- #endif
139
-
140
142
#ifdef HAVE_FORKX
141
143
#include <sys/fork.h>
142
144
#endif
@@ -1607,7 +1609,7 @@ PHP_FUNCTION(pcntl_forkx)
1607
1609
#endif
1608
1610
/* }}} */
1609
1611
1610
- #ifdef HAVE_PIDFD_OPEN
1612
+ #ifdef HAVE_LINUX_RAW_SYSCALL_PIDFD_OPEN
1611
1613
// The `pidfd_open` syscall is available since 5.3
1612
1614
// and `setns` since 3.0.
1613
1615
PHP_FUNCTION (pcntl_setns )
You can’t perform that action at this time.
0 commit comments