Skip to content

Commit 0332b62

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
2 parents 1944c14 + ef06f0f commit 0332b62

File tree

2 files changed

+51
-11
lines changed

2 files changed

+51
-11
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ PHP NEWS
3030
(Jakub Zelenka)
3131
. Fixed bug #77023 (FPM cannot shutdown processes). (Jakub Zelenka)
3232
. Fixed comment in kqueue remove callback log message. (David Carlier)
33+
. Fixed ACL build check on MacOS. (David Carlier)
3334

3435
- Hash:
3536
. Fixed bug #81714 (segfault when serializing finalized HashContext). (cmb)

sapi/fpm/config.m4

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -555,18 +555,57 @@ if test "$PHP_FPM" != "no"; then
555555
fi
556556

557557
if test "$PHP_FPM_ACL" != "no" ; then
558+
AC_MSG_CHECKING([for acl user/group permissions support])
558559
AC_CHECK_HEADERS([sys/acl.h])
559-
dnl *BSD has acl_* built into libc.
560-
AC_CHECK_FUNC(acl_free, [
561-
AC_DEFINE(HAVE_FPM_ACL, 1, [ POSIX Access Control List ])
562-
],[
563-
AC_CHECK_LIB(acl, acl_free, [
564-
PHP_ADD_LIBRARY(acl)
565-
AC_DEFINE(HAVE_FPM_ACL, 1, [ POSIX Access Control List ])
566-
],[
567-
AC_MSG_ERROR(libacl required not found)
568-
])
569-
])
560+
561+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <sys/acl.h>
562+
int main()
563+
{
564+
acl_t acl;
565+
acl_entry_t user, group;
566+
acl = acl_init(1);
567+
acl_create_entry(&acl, &user);
568+
acl_set_tag_type(user, ACL_USER);
569+
acl_create_entry(&acl, &group);
570+
acl_set_tag_type(user, ACL_GROUP);
571+
acl_free(acl);
572+
return 0;
573+
}
574+
]])], [
575+
AC_CHECK_LIB(acl, acl_free,
576+
[PHP_ADD_LIBRARY(acl)
577+
have_fpm_acl=yes
578+
AC_MSG_RESULT([yes])
579+
],[
580+
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/acl.h>
581+
int main()
582+
{
583+
acl_t acl;
584+
acl_entry_t user, group;
585+
acl = acl_init(1);
586+
acl_create_entry(&acl, &user);
587+
acl_set_tag_type(user, ACL_USER);
588+
acl_create_entry(&acl, &group);
589+
acl_set_tag_type(user, ACL_GROUP);
590+
acl_free(acl);
591+
return 0;
592+
}
593+
]])], [
594+
have_fpm_acl=yes
595+
AC_MSG_RESULT([yes])
596+
], [
597+
have_fpm_acl=no
598+
AC_MSG_RESULT([no])
599+
], [AC_MSG_RESULT([skipped])])
600+
])
601+
], [
602+
have_fpm_acl=no
603+
AC_MSG_RESULT([no])
604+
], [AC_MSG_RESULT([skipped (cross-compiling)])])
605+
606+
if test "$have_fpm_acl" = "yes"; then
607+
AC_DEFINE([HAVE_FPM_ACL], 1, [do we have acl support?])
608+
fi
570609
fi
571610

572611
if test "x$PHP_FPM_APPARMOR" != "xno" ; then

0 commit comments

Comments
 (0)