From: Joerg Sonnenberger Date: Thu, 23 Jun 2016 13:16:16 +0000 (+0200) Subject: For getvfsbyname on DragonFly, struct vfsconf has to be used and not X-Git-Tag: v3.2.2~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7642e12ea7636933cfaeecef1b26daf6490ad52;p=thirdparty%2Flibarchive.git For getvfsbyname on DragonFly, struct vfsconf has to be used and not struct xvfsconf as on FreeBSD. --- diff --git a/configure.ac b/configure.ac index 4f7f432ab..bda5e6eb0 100644 --- a/configure.ac +++ b/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 + #endif + #include + ]) + # There are several variants of readdir_r around; we only # accept the POSIX-compliant version. AC_COMPILE_IFELSE( diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c index 22a1f14c0..f54cda69c 100644 --- a/libarchive/archive_read_disk_posix.c +++ b/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)