diff options
author | Andreas Gruenbacher <andreas.gruenbacher@gmail.com> | 2015-04-28 12:01:19 +0200 |
---|---|---|
committer | Andreas Gruenbacher <andreas.gruenbacher@gmail.com> | 2015-05-27 23:37:50 +0200 |
commit | f1b37e3afb1ba17be1c11012f86ff14e5cc357af (patch) | |
tree | 6923deb126e9991040dee1214151567f20630411 /lib/file-has-acl.c | |
parent | 70e0e9ed738ddc514b09fa486421fc86c31c7e25 (diff) | |
download | gnulib-f1b37e3afb1ba17be1c11012f86ff14e5cc357af.tar.gz |
file-has-acl: Split feature tests again (Bug#20667)
* lib/file-has-acl.c: Instead of testing for
XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT,
define them when needed.
* m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's
GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore.
Diffstat (limited to 'lib/file-has-acl.c')
-rw-r--r-- | lib/file-has-acl.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c index 7e26c53c15..e1871176c0 100644 --- a/lib/file-has-acl.c +++ b/lib/file-has-acl.c @@ -29,8 +29,11 @@ #include "acl-internal.h" -#if GETXATTR_WITH_POSIX_ACLS +#if HAVE_SYS_XATTR_H # include <sys/xattr.h> +#endif + +#if HAVE_LINUX_XATTR_H # include <linux/xattr.h> #endif @@ -48,7 +51,15 @@ file_has_acl (char const *name, struct stat const *sb) if (! S_ISLNK (sb->st_mode)) { -# if GETXATTR_WITH_POSIX_ACLS +# if HAVE_GETXATTR + +# 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 ssize_t ret; |