summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_platform.h
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2005-04-23 17:56:34 +0000
committerkientzle <kientzle@FreeBSD.org>2005-04-23 17:56:34 +0000
commit47cfd711c77f00faf0e75f838246f0ae88874eeb (patch)
tree900cd623433175792c5244946a83cce75279aff4 /lib/libarchive/archive_platform.h
parent5be5ef99a1a65426e3fb8f581e36ff43adddf0c4 (diff)
downloadFreeBSD-src-47cfd711c77f00faf0e75f838246f0ae88874eeb.zip
FreeBSD-src-47cfd711c77f00faf0e75f838246f0ae88874eeb.tar.gz
Fix broken ACL configuration on FreeBSD 4 and Linux.
Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
Diffstat (limited to 'lib/libarchive/archive_platform.h')
-rw-r--r--lib/libarchive/archive_platform.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/libarchive/archive_platform.h b/lib/libarchive/archive_platform.h
index 0e98ad3..770d808 100644
--- a/lib/libarchive/archive_platform.h
+++ b/lib/libarchive/archive_platform.h
@@ -43,6 +43,11 @@
/* A default configuration for FreeBSD, used if there is no config.h. */
#ifdef __FreeBSD__
+#if __FreeBSD__ > 4
+#define HAVE_ACL_CREATE_ENTRY 1
+#define HAVE_ACL_INIT 1
+#define HAVE_ACL_SET_FILE 1
+#endif
#define HAVE_BZLIB_H 1
#define HAVE_CHFLAGS 1
#define HAVE_DECL_STRERROR_R 1
@@ -74,9 +79,7 @@
#define HAVE_STRRCHR 1
#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1
#define HAVE_STRUCT_STAT_ST_RDEV 1
-#if __FreeBSD__ > 4
#define HAVE_SYS_ACL_H 1
-#endif
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
@@ -111,9 +114,13 @@
#define uintmax_t uint64_t
#endif
-/* TODO: Test for the functions we use as well... */
-#if HAVE_SYS_ACL_H
-#define HAVE_POSIX_ACLS 1
+/*
+ * If this platform has <sys/acl.h>, acl_create(), acl_init(), and
+ * acl_set_file(), we assume it has the rest of the POSIX.1e draft
+ * functions used in archive_read_extract.c.
+ */
+#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE
+#define HAVE_POSIX_ACL 1
#endif
/* Set up defaults for internal error codes. */
OpenPOWER on IntegriCloud