diff options
author | Brad King <brad.king@kitware.com> | 2011-12-22 21:59:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-12-23 21:04:59 (GMT) |
commit | 02d5e40572408efc3733e796dd6a199f4d9ae7f2 (patch) | |
tree | 083492d46c8342054288a5a9f799b206e21b3900 /Utilities/cmlibarchive/libarchive | |
parent | 8b7ee30bf4fd1b4aebc7033dc8dbcbb5f7c88c83 (diff) | |
download | CMake-02d5e40572408efc3733e796dd6a199f4d9ae7f2.zip CMake-02d5e40572408efc3733e796dd6a199f4d9ae7f2.tar.gz CMake-02d5e40572408efc3733e796dd6a199f4d9ae7f2.tar.bz2 |
libarchive: Check for 'struct statvfs' member 'f_iosize'
Configure the result as definition HAVE_STRUCT_STATVFS_F_IOSIZE and use
the member only if it exists. At least one platform (IRIX) provides
struct statvfs without this member.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c index 2b7f778..557b26b 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c @@ -1382,8 +1382,13 @@ setup_current_filesystem(struct archive_read_disk *a) * for pathconf() function. */ t->current_filesystem->xfer_align = sfs.f_frsize; t->current_filesystem->max_xfer_size = -1; +#if defined(HAVE_STRUCT_STATVFS_F_IOSIZE) t->current_filesystem->min_xfer_size = sfs.f_iosize; t->current_filesystem->incr_xfer_size = sfs.f_iosize; +#else + t->current_filesystem->min_xfer_size = sfs.f_bsize; + t->current_filesystem->incr_xfer_size = sfs.f_bsize; +#endif } if (sfs.f_flag & ST_LOCAL) t->current_filesystem->remote = 0; |