From d6402072f2d0f83b6dae110d80f08d42900d31f7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 6 Nov 2025 08:36:50 +0200 Subject: [PATCH] A better fix for recent changes in Gnulib's acl_entries.c See https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg00145.html for the related discussions. * nt/mingw-cfg.site (ac_cv_func_acl_entries): Set to "yes" to disable compilation of lib/acl_entries.c on MinGW. * lib/acl_entries.c (acl_entries): Revert last change, as it is no longer needed. --- lib/acl_entries.c | 2 +- nt/mingw-cfg.site | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/acl_entries.c b/lib/acl_entries.c index f9619c0f539..b78ba18a656 100644 --- a/lib/acl_entries.c +++ b/lib/acl_entries.c @@ -44,7 +44,7 @@ acl_entries (acl_t acl) got_one >= 0; got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace)) count++; -#elif !defined __MINGW32__ /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */ +#else /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */ /* acl_get_entry returns 1 when it successfully fetches an entry, and 0 at the end. */ acl_entry_t ace; diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site index 16b61de3bd0..7829a9878fe 100644 --- a/nt/mingw-cfg.site +++ b/nt/mingw-cfg.site @@ -46,12 +46,13 @@ ac_cv_search_clock_gettime="none required" ac_cv_func_clock_gettime=no ac_cv_func_clock_settime=no -# ACL functions are implemented in w32.c +# ACL functions are either implemented in w32.c or not needed ac_cv_search_acl_get_file="none required" ac_cv_func_acl_get_file=yes ac_cv_func_acl_set_file=yes ac_cv_func_acl_free=yes ac_cv_func_acl_from_text=yes +ac_cv_func_acl_entries=yes gl_cv_func_working_acl_get_file=yes # Autoconf's test program is not smart enough, and fails to detect gethostname ac_cv_func_gethostname=yes