diff options
author | Martin Matuska <martin@matuska.org> | 2018-01-24 11:21:15 +0100 |
---|---|---|
committer | Martin Matuska <martin@matuska.org> | 2018-01-24 11:50:02 +0100 |
commit | 2d9156bb3ad92c43c1e81546f4a2c21549ba248f (patch) | |
tree | 00cb0849bc3fd82ee04e71fb123b30a557e30a55 | |
parent | e898f235b19ae86b7d2013cfb254f482b13e5284 (diff) | |
download | libarchive-2d9156bb3ad92c43c1e81546f4a2c21549ba248f.tar.gz |
Fix build on FreeBSD with NFS4 ACLs without ACL_ENTRY_INHERITED
Fixes #952
-rw-r--r-- | libarchive/archive_disk_acl_freebsd.c | 2 | ||||
-rw-r--r-- | libarchive/test/test_acl_platform_nfs4.c | 2 | ||||
-rw-r--r-- | tar/test/test_option_acls.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/libarchive/archive_disk_acl_freebsd.c b/libarchive/archive_disk_acl_freebsd.c index 07d08ff9..aba41e5d 100644 --- a/libarchive/archive_disk_acl_freebsd.c +++ b/libarchive/archive_disk_acl_freebsd.c @@ -93,7 +93,9 @@ static const acl_perm_map_t acl_nfs4_flag_map[] = { {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, +#ifdef ACL_ENTRY_INHERITED {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} +#endif }; static const int acl_nfs4_flag_map_size = diff --git a/libarchive/test/test_acl_platform_nfs4.c b/libarchive/test/test_acl_platform_nfs4.c index a3868a62..410582bf 100644 --- a/libarchive/test/test_acl_platform_nfs4.c +++ b/libarchive/test/test_acl_platform_nfs4.c @@ -408,7 +408,9 @@ acl_flagset_to_bitmap(acl_flagset_t opaque_fs) {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, RICHACE_INHERIT_ONLY_ACE}, {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, RICHACE_INHERITED_ACE} #else /* FreeBSD NFSv4 ACL inheritance flags */ +#ifdef ACL_ENTRY_INHERITED {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, +#endif {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, diff --git a/tar/test/test_option_acls.c b/tar/test/test_option_acls.c index 325f3195..f7451c8e 100644 --- a/tar/test/test_option_acls.c +++ b/tar/test/test_option_acls.c @@ -85,7 +85,9 @@ static const acl_flag_t acl_flags[] = { ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_FAILED_ACCESS, +#ifdef ACL_ENTRY_INHERITED ACL_ENTRY_INHERITED +#endif #endif /* ARCHIVE_ACL_FREEBSD_NFS4 */ }; #endif /* ARCHIVE_ACL_DARWIN || ARCHIVE_ACL_FREEBSD_NFS4 */ |