diff options
author | Ron Yorston <rmy@pobox.com> | 2016-05-24 11:05:53 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-05-24 11:05:53 +0100 |
commit | 53c3b087b078e040705a68d085644b7ca060962a (patch) | |
tree | 6dd3fa8f456e494fe8bd5edadf9813e67fe84c5b | |
parent | 0d5f85b255e68385b4aa1b6b8c40ab4b7ad35125 (diff) | |
download | busybox-w32-53c3b087b078e040705a68d085644b7ca060962a.tar.gz busybox-w32-53c3b087b078e040705a68d085644b7ca060962a.tar.bz2 busybox-w32-53c3b087b078e040705a68d085644b7ca060962a.zip |
archival: remove WIN32-specific code now lseek fails on pipes
-rw-r--r-- | archival/cpio.c | 4 | ||||
-rw-r--r-- | archival/libarchive/init_handle.c | 5 |
2 files changed, 0 insertions, 9 deletions
diff --git a/archival/cpio.c b/archival/cpio.c index d0cedd35c..3b1550720 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
@@ -403,10 +403,6 @@ int cpio_main(int argc UNUSED_PARAM, char **argv) | |||
403 | #if !ENABLE_FEATURE_CPIO_O | 403 | #if !ENABLE_FEATURE_CPIO_O |
404 | if (opt & OPT_FILE) { /* -F */ | 404 | if (opt & OPT_FILE) { /* -F */ |
405 | xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO); | 405 | xmove_fd(xopen(cpio_filename, O_RDONLY), STDIN_FILENO); |
406 | #if ENABLE_PLATFORM_MINGW32 | ||
407 | /* default is seek_by_read but seek_by_jump is OK for file */ | ||
408 | archive_handle->seek = seek_by_jump; | ||
409 | #endif | ||
410 | } | 406 | } |
411 | #else | 407 | #else |
412 | if ((opt & (OPT_FILE|OPT_CREATE)) == OPT_FILE) { /* -F without -o */ | 408 | if ((opt & (OPT_FILE|OPT_CREATE)) == OPT_FILE) { /* -F without -o */ |
diff --git a/archival/libarchive/init_handle.c b/archival/libarchive/init_handle.c index b1166d577..cbae06ac3 100644 --- a/archival/libarchive/init_handle.c +++ b/archival/libarchive/init_handle.c | |||
@@ -16,12 +16,7 @@ archive_handle_t* FAST_FUNC init_handle(void) | |||
16 | archive_handle->action_header = header_skip; | 16 | archive_handle->action_header = header_skip; |
17 | archive_handle->action_data = data_skip; | 17 | archive_handle->action_data = data_skip; |
18 | archive_handle->filter = filter_accept_all; | 18 | archive_handle->filter = filter_accept_all; |
19 | #if !ENABLE_PLATFORM_MINGW32 | ||
20 | archive_handle->seek = seek_by_jump; | 19 | archive_handle->seek = seek_by_jump; |
21 | #else | ||
22 | /* can't reliably detect pipes on WIN32: default to seek_by_read */ | ||
23 | archive_handle->seek = seek_by_read; | ||
24 | #endif | ||
25 | 20 | ||
26 | return archive_handle; | 21 | return archive_handle; |
27 | } | 22 | } |