diff options
| author | Tim Kientzle <kientzle@FreeBSD.org> | 2008-09-12 04:03:34 +0000 |
|---|---|---|
| committer | Tim Kientzle <kientzle@FreeBSD.org> | 2008-09-12 04:03:34 +0000 |
| commit | 220265229d196aa96a5fb3df55cf67f59bdab243 (patch) | |
| tree | 1878f87aa630b7b2910378c00e6d1f90aa1ef5cb /lib/libarchive/archive_write_disk.c | |
| parent | 6d35d9a6e9aacf7465613823d434f2336a371209 (diff) | |
Notes
Diffstat (limited to 'lib/libarchive/archive_write_disk.c')
| -rw-r--r-- | lib/libarchive/archive_write_disk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libarchive/archive_write_disk.c b/lib/libarchive/archive_write_disk.c index b63a7b72d639..f0bec6e9c812 100644 --- a/lib/libarchive/archive_write_disk.c +++ b/lib/libarchive/archive_write_disk.c @@ -514,9 +514,15 @@ write_data_block(struct archive_write_disk *a, } if (a->flags & ARCHIVE_EXTRACT_SPARSE) { +#if HAVE_STRUCT_STAT_ST_BLKSIZE if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK) return (r); block_size = a->pst->st_blksize; +#else + /* XXX TODO XXX Is there a more appropriate choice here ? */ + /* This needn't match the filesystem allocation size. */ + block_size = 16*1024; +#endif } if (a->filesize >= 0 && (off_t)(offset + size) > a->filesize) |
