summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2005-09-24 21:17:47 +0000
committerkientzle <kientzle@FreeBSD.org>2005-09-24 21:17:47 +0000
commit163e4801c503d3e63e54f04a71cc7e7a0989ca40 (patch)
tree388a1b1a39360968d9fc09961b9670c3a08fa908 /usr.bin/tar
parent7326792e216e565f272c88a0b1fb681efed6b11d (diff)
downloadFreeBSD-src-163e4801c503d3e63e54f04a71cc7e7a0989ca40.zip
FreeBSD-src-163e4801c503d3e63e54f04a71cc7e7a0989ca40.tar.gz
Detect Mac OS X's broken ACL library.
Thanks to: Diego "Flameeyes" Petten?
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/bsdtar_platform.h2
-rw-r--r--usr.bin/tar/configure.ac.in7
2 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/tar/bsdtar_platform.h b/usr.bin/tar/bsdtar_platform.h
index d4eca6f..57b027b 100644
--- a/usr.bin/tar/bsdtar_platform.h
+++ b/usr.bin/tar/bsdtar_platform.h
@@ -120,7 +120,7 @@
* including some variant of the acl_get_perm() function (which was
* omitted from the POSIX.1e draft)?
*/
-#if HAVE_SYS_ACL_H && HAVE_ACL_PERMSET_T
+#if HAVE_SYS_ACL_H && HAVE_ACL_PERMSET_T && HAVE_ACL_USER
#if HAVE_ACL_GET_PERM || HAVE_ACL_GET_PERM_NP
#define HAVE_POSIX_ACL 1
#endif
diff --git a/usr.bin/tar/configure.ac.in b/usr.bin/tar/configure.ac.in
index 249fa7b..b94b3a0 100644
--- a/usr.bin/tar/configure.ac.in
+++ b/usr.bin/tar/configure.ac.in
@@ -82,6 +82,13 @@ AC_CHECK_FUNCS(acl_get_perm_np acl_get_perm,,,
#endif
])
+# MacOS has an acl.h that isn't POSIX. It can be detected by
+# checking for ACL_USER
+AC_CHECK_DECL([ACL_USER],
+ [AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])],
+ [],
+ [#include <sys/acl.h>])
+
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_LSTAT
OpenPOWER on IntegriCloud