]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
For getvfsbyname on DragonFly, struct vfsconf has to be used and not
authorJoerg Sonnenberger <joerg@bec.de>
Thu, 23 Jun 2016 13:16:16 +0000 (15:16 +0200)
committerJoerg Sonnenberger <joerg@bec.de>
Thu, 23 Jun 2016 13:16:16 +0000 (15:16 +0200)
struct xvfsconf as on FreeBSD.

configure.ac
libarchive/archive_read_disk_posix.c

index 4f7f432ab2d779ab718bf7be10a7188834834e64..bda5e6eb01da7f27304ad20507a9137c5d1a1836 100644 (file)
@@ -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(
index 22a1f14c0e03f8208a23297456fbfa9e8845e4c1..f54cda69c125fda4f8f6c2177892a5331055fcfd 100644 (file)
@@ -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)