summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2016-06-23 13:39:03 +0000
committerjoerg <joerg@pkgsrc.org>2016-06-23 13:39:03 +0000
commit2a195688144bdcfca3a531ba88249bd7097f4c5e (patch)
tree69e85f99314512615b7062ece471e722b4afc4e6 /archivers
parentfe4e699f002c81fbd55edd06ce8fbb6914f4fe7a (diff)
downloadpkgsrc-2a195688144bdcfca3a531ba88249bd7097f4c5e.tar.gz
Detect vfsconf for DragonFly, since it doesn't use xvfsconf like
FreeBSD.
Diffstat (limited to 'archivers')
-rw-r--r--archivers/libarchive/files/config.h.in3
-rwxr-xr-xarchivers/libarchive/files/configure17
-rw-r--r--archivers/libarchive/files/configure.ac8
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_disk_posix.c4
4 files changed, 32 insertions, 0 deletions
diff --git a/archivers/libarchive/files/config.h.in b/archivers/libarchive/files/config.h.in
index f5bc56fef64..58cec2998e0 100644
--- a/archivers/libarchive/files/config.h.in
+++ b/archivers/libarchive/files/config.h.in
@@ -784,6 +784,9 @@
/* Define to 1 if `__tm_gmtoff' is a member of `struct tm'. */
#undef HAVE_STRUCT_TM___TM_GMTOFF
+/* Define to 1 if the system has the type `struct vfsconf'. */
+#undef HAVE_STRUCT_VFSCONF
+
/* Define to 1 if you have the `symlink' function. */
#undef HAVE_SYMLINK
diff --git a/archivers/libarchive/files/configure b/archivers/libarchive/files/configure
index c07e05b468f..a99f7f7d70d 100755
--- a/archivers/libarchive/files/configure
+++ b/archivers/libarchive/files/configure
@@ -17264,6 +17264,23 @@ fi
done
+# DragonFly uses vfsconf, FreeBSD xvfsconf.
+ac_fn_c_check_type "$LINENO" "struct vfsconf" "ac_cv_type_struct_vfsconf" "#if HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #include <sys/mount.h>
+
+"
+if test "x$ac_cv_type_struct_vfsconf" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_VFSCONF 1
+_ACEOF
+
+
+fi
+
+
# There are several variants of readdir_r around; we only
# accept the POSIX-compliant version.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/archivers/libarchive/files/configure.ac b/archivers/libarchive/files/configure.ac
index 4f7f432ab2d..bda5e6eb01d 100644
--- a/archivers/libarchive/files/configure.ac
+++ b/archivers/libarchive/files/configure.ac
@@ -616,6 +616,14 @@ AC_CHECK_FUNCS([_get_timezone _localtime64_s _mkgmtime64])
# detects cygwin-1.7, as opposed to older versions
AC_CHECK_FUNCS([cygwin_conv_path])
+# DragonFly uses vfsconf, FreeBSD xvfsconf.
+AC_CHECK_TYPES(struct vfsconf,,,
+ [#if HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #include <sys/mount.h>
+ ])
+
# There are several variants of readdir_r around; we only
# accept the POSIX-compliant version.
AC_COMPILE_IFELSE(
diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_posix.c b/archivers/libarchive/files/libarchive/archive_read_disk_posix.c
index 22a1f14c0e0..f54cda69c12 100644
--- a/archivers/libarchive/files/libarchive/archive_read_disk_posix.c
+++ b/archivers/libarchive/files/libarchive/archive_read_disk_posix.c
@@ -1504,7 +1504,11 @@ setup_current_filesystem(struct archive_read_disk *a)
struct tree *t = a->tree;
struct statfs sfs;
#if defined(HAVE_GETVFSBYNAME) && defined(VFCF_SYNTHETIC)
+# if defined(HAVE_STRUCT_VFSCONF)
+ struct vfsconf vfc;
+# else
struct xvfsconf vfc;
+# endif
#endif
int r, xr = 0;
#if !defined(HAVE_STRUCT_STATFS_F_NAMEMAX)