diff options
author | Ron Yorston <rmy@pobox.com> | 2019-02-14 11:25:52 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-02-14 11:25:52 +0000 |
commit | 6312c005522de47dcaf442f613065415bcbd8ef7 (patch) | |
tree | 6938d11a29007a651191a954842211481c18befb /archival | |
parent | 9aae70405e22a97abd610052378eaad3dee281a3 (diff) | |
download | busybox-w32-6312c005522de47dcaf442f613065415bcbd8ef7.tar.gz busybox-w32-6312c005522de47dcaf442f613065415bcbd8ef7.tar.bz2 busybox-w32-6312c005522de47dcaf442f613065415bcbd8ef7.zip |
libarchive: remove more symlink code
Since symlinks aren't supported in busybox-w32 remove more of the
code that handles them.
Saves 64 bytes.
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libarchive/unsafe_symlink_target.c | 5 | ||||
-rw-r--r-- | archival/unzip.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/archival/libarchive/unsafe_symlink_target.c b/archival/libarchive/unsafe_symlink_target.c index f53881f2f..ff96991f5 100644 --- a/archival/libarchive/unsafe_symlink_target.c +++ b/archival/libarchive/unsafe_symlink_target.c | |||
@@ -5,11 +5,10 @@ | |||
5 | #include "libbb.h" | 5 | #include "libbb.h" |
6 | #include "bb_archive.h" | 6 | #include "bb_archive.h" |
7 | 7 | ||
8 | void FAST_FUNC create_or_remember_link(llist_t **link_placeholders | 8 | void FAST_FUNC create_or_remember_link(llist_t **link_placeholders, |
9 | IF_PLATFORM_MINGW32(UNUSED_PARAM), | ||
10 | const char *target, | 9 | const char *target, |
11 | const char *linkname, | 10 | const char *linkname, |
12 | int hard_link IF_PLATFORM_MINGW32(UNUSED_PARAM)) | 11 | int hard_link) |
13 | { | 12 | { |
14 | #if !ENABLE_PLATFORM_MINGW32 | 13 | #if !ENABLE_PLATFORM_MINGW32 |
15 | if (hard_link || target[0] == '/' || strstr(target, "..")) { | 14 | if (hard_link || target[0] == '/' || strstr(target, "..")) { |
diff --git a/archival/unzip.c b/archival/unzip.c index 6328f4bab..4e8ed0eae 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -348,6 +348,9 @@ static void unzip_create_leading_dirs(const char *fn) | |||
348 | } | 348 | } |
349 | 349 | ||
350 | #if ENABLE_FEATURE_UNZIP_CDF | 350 | #if ENABLE_FEATURE_UNZIP_CDF |
351 | #if ENABLE_PLATFORM_MINGW32 | ||
352 | #define unzip_extract_symlink(s, z, d) unzip_extract_symlink(z, d) | ||
353 | #endif | ||
351 | static void unzip_extract_symlink(llist_t **symlink_placeholders, | 354 | static void unzip_extract_symlink(llist_t **symlink_placeholders, |
352 | zip_header_t *zip, | 355 | zip_header_t *zip, |
353 | const char *dst_fn) | 356 | const char *dst_fn) |
@@ -492,7 +495,7 @@ int unzip_main(int argc, char **argv) | |||
492 | llist_t *zaccept = NULL; | 495 | llist_t *zaccept = NULL; |
493 | llist_t *zreject = NULL; | 496 | llist_t *zreject = NULL; |
494 | char *base_dir = NULL; | 497 | char *base_dir = NULL; |
495 | #if ENABLE_FEATURE_UNZIP_CDF | 498 | #if ENABLE_FEATURE_UNZIP_CDF && !ENABLE_PLATFORM_MINGW32 |
496 | llist_t *symlink_placeholders = NULL; | 499 | llist_t *symlink_placeholders = NULL; |
497 | #endif | 500 | #endif |
498 | int i; | 501 | int i; |