diff options
author | joerg <joerg> | 2016-06-23 13:39:03 +0000 |
---|---|---|
committer | joerg <joerg> | 2016-06-23 13:39:03 +0000 |
commit | cbe0b8a3012458e59c0e70ab246daac0f54ba291 (patch) | |
tree | dfbbe24e0c74a013107bf97560861875a2fca207 /archivers | |
parent | 74073f32ab4a8f9f779f8df4a69905b4f3b25723 (diff) | |
download | pkgsrc-cbe0b8a3012458e59c0e70ab246daac0f54ba291.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.in | 3 | ||||
-rwxr-xr-x | archivers/libarchive/files/configure | 17 | ||||
-rw-r--r-- | archivers/libarchive/files/configure.ac | 8 | ||||
-rw-r--r-- | archivers/libarchive/files/libarchive/archive_read_disk_posix.c | 4 |
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) |