From: Bruno Haible Date: Wed, 5 Nov 2025 23:17:21 +0000 (+0100) Subject: acl-permissions: Fix compilation error (regression 2025-09-10). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf9cf662815d840edd6652237663eb088bdc07b1;p=thirdparty%2Fgnulib.git acl-permissions: Fix compilation error (regression 2025-09-10). Reported by Eli Zaretskii in . * lib/acl_entries.c (acl_entries): Restore a #if, mistakenly removed on 2025-09-10. --- diff --git a/ChangeLog b/ChangeLog index e9eef97cd5..8c27811ea2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-11-05 Bruno Haible + + acl-permissions: Fix compilation error (regression 2025-09-10). + Reported by Eli Zaretskii in + . + * lib/acl_entries.c (acl_entries): Restore a #if, mistakenly removed on + 2025-09-10. + 2025-11-04 Collin Funk nproc: Fix compilation error with Android API ≤ 20. diff --git a/lib/acl_entries.c b/lib/acl_entries.c index b78ba18a65..7b44e69489 100644 --- a/lib/acl_entries.c +++ b/lib/acl_entries.c @@ -22,7 +22,10 @@ #include "acl-internal.h" /* This file assumes POSIX-draft like ACLs - (Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5). */ + (Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5). + + It is compiled only on systems that do not have the acl_entries() function + (in libc or libacl). */ /* Return the number of entries in ACL. Return -1 and set errno upon failure to determine it. */ @@ -34,7 +37,8 @@ acl_entries (acl_t acl) if (acl != NULL) { -#if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ +#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */ +# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ /* acl_get_entry returns 0 when it successfully fetches an entry, and -1/EINVAL at the end. */ acl_entry_t ace; @@ -44,7 +48,7 @@ acl_entries (acl_t acl) got_one >= 0; got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace)) count++; -#else /* 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; @@ -56,6 +60,7 @@ acl_entries (acl_t acl) count++; if (got_one < 0) return -1; +# endif #endif }