Skip to content

Commit 7b2c67c

Browse files
authored
Simplify setpflags Autoconf check (#13458)
Similar simplification as e72f0c8.
1 parent ec9ae1e commit 7b2c67c

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

sapi/fpm/config.m4

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ AC_DEFUN([AC_FPM_STDLIBS],
1212
AC_SEARCH_LIBS(inet_addr, nsl)
1313
])
1414

15-
AC_DEFUN([AC_FPM_SETPFLAGS],
16-
[
17-
AC_MSG_CHECKING([for setpflags])
18-
19-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <priv.h>]], [[setpflags(0, 0);]])], [
20-
AC_DEFINE([HAVE_SETPFLAGS], 1, [do we have setpflags?])
21-
AC_MSG_RESULT([yes])
22-
], [
23-
AC_MSG_RESULT([no])
24-
])
25-
])
26-
2715
AC_DEFUN([AC_FPM_CLOCK],
2816
[
2917
have_clock_gettime=no
@@ -507,7 +495,6 @@ if test "$PHP_FPM" != "no"; then
507495
AC_MSG_RESULT($PHP_FPM)
508496

509497
AC_FPM_STDLIBS
510-
AC_FPM_SETPFLAGS
511498
AC_FPM_CLOCK
512499
AC_FPM_TRACE
513500
AC_FPM_BUILTIN_ATOMIC
@@ -520,6 +507,8 @@ if test "$PHP_FPM" != "no"; then
520507
AC_FPM_EPOLL
521508
AC_FPM_SELECT
522509

510+
AC_CHECK_HEADER([priv.h], [AC_CHECK_FUNCS([setpflags])])
511+
523512
PHP_ARG_WITH([fpm-user],,
524513
[AS_HELP_STRING([[--with-fpm-user[=USER]]],
525514
[Set the user for php-fpm to run as. (default: nobody)])],

0 commit comments

Comments
 (0)