Testing GNU gettext's portability on Slackware 13, I get a compilation error:

file-has-acl.c: In function 'file_has_acl':
file-has-acl.c:216:30: error: 'XATTR_NAME_POSIX_ACL_ACCESS' undeclared (first 
use in this function)
file-has-acl.c:216:30: note: each undeclared identifier is reported only once 
for each function it appears in
file-has-acl.c:218:34: error: 'XATTR_NAME_POSIX_ACL_DEFAULT' undeclared (first 
use in this function)
make[6]: *** [file-has-acl.o] Error 1

The cause is that on 2023-05-12, the explicit check for
XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT was removed
from m4/acl.m4. Slackware 13 (with glibc 2.13 and Linux 2.6.37) does not
have these macros. So we have to provide a fallback, like it was done in 2015.


2023-06-05  Bruno Haible  <[email protected]>

        file-has-acl: Fix compilation error on Slackware 13 (regr. 2023-05-12).
        * lib/file-has-acl.c (XATTR_NAME_POSIX_ACL_ACCESS,
        XATTR_NAME_POSIX_ACL_DEFAULT): Add fallback definitions.

diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index 13f08c3055..3eeaf9c57d 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -40,6 +40,12 @@
 # ifndef XATTR_NAME_NFSV4_ACL
 #  define XATTR_NAME_NFSV4_ACL "system.nfs4_acl"
 # endif
+# ifndef XATTR_NAME_POSIX_ACL_ACCESS
+#  define XATTR_NAME_POSIX_ACL_ACCESS "system.posix_acl_access"
+# endif
+# ifndef XATTR_NAME_POSIX_ACL_DEFAULT
+#  define XATTR_NAME_POSIX_ACL_DEFAULT "system.posix_acl_default"
+# endif
 
 enum {
   /* ACE4_ACCESS_ALLOWED_ACE_TYPE = 0x00000000, */




Reply via email to