diff --git a/build/php.m4 b/build/php.m4 index 8b915d65aff2e..e975985fe7498 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2679,32 +2679,6 @@ AC_DEFUN([PHP_PATCH_CONFIG_HEADERS], [ > $srcdir/$1.tmp && mv $srcdir/$1.tmp $srcdir/$1 ]) -dnl Check if we have prctl -AC_DEFUN([PHP_CHECK_PRCTL], -[ - AC_MSG_CHECKING([for prctl]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[prctl(0, 0, 0, 0, 0);]])], [ - AC_DEFINE([HAVE_PRCTL], 1, [do we have prctl?]) - AC_MSG_RESULT([yes]) - ], [ - AC_MSG_RESULT([no]) - ]) -]) - -dnl Check if we have procctl -AC_DEFUN([PHP_CHECK_PROCCTL], -[ - AC_MSG_CHECKING([for procctl]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[procctl(0, 0, 0, 0);]])], [ - AC_DEFINE([HAVE_PROCCTL], 1, [do we have procctl?]) - AC_MSG_RESULT([yes]) - ], [ - AC_MSG_RESULT([no]) - ]) -]) - dnl dnl PHP_CHECK_AVX512_SUPPORTS dnl diff --git a/configure.ac b/configure.ac index fb2054f2560ca..933ea4ba1a24a 100644 --- a/configure.ac +++ b/configure.ac @@ -410,7 +410,6 @@ sys/file.h \ sys/mman.h \ sys/mount.h \ sys/poll.h \ -sys/procctl.h \ sys/resource.h \ sys/select.h \ sys/socket.h \ @@ -515,10 +514,6 @@ dnl Check __builtin_cpu_supports PHP_CHECK_BUILTIN_CPU_SUPPORTS dnl Check __builtin_frame_address PHP_CHECK_BUILTIN_FRAME_ADDRESS -dnl Check prctl -PHP_CHECK_PRCTL -dnl Check procctl -PHP_CHECK_PROCCTL dnl Check AVX512 PHP_CHECK_AVX512_SUPPORTS dnl Check AVX512 VBMI @@ -643,6 +638,10 @@ AC_CHECK_FUNC([inet_pton],,[AC_MSG_ERROR([Required inet_pton not found.])]) dnl Check for strerror_r, and if its a POSIX-compatible or a GNU specific version. AC_FUNC_STRERROR_R +dnl Check for functions inside their belonging headers. +AC_CHECK_HEADER([sys/prctl.h], [AC_CHECK_FUNCS([prctl])]) +AC_CHECK_HEADER([sys/procctl.h], [AC_CHECK_FUNCS([procctl])]) + AX_FUNC_WHICH_GETHOSTBYNAME_R dnl Some systems (like OpenSolaris) do not have nanosleep in libc. diff --git a/ext/opcache/shared_alloc_mmap.c b/ext/opcache/shared_alloc_mmap.c index d5e4612bc104e..167b1c26905cd 100644 --- a/ext/opcache/shared_alloc_mmap.c +++ b/ext/opcache/shared_alloc_mmap.c @@ -34,7 +34,7 @@ #endif #include "zend_execute.h" -#ifdef HAVE_SYS_PROCCTL_H +#ifdef HAVE_PROCCTL #include #endif