diff options
-rw-r--r-- | archival/libarchive/unsafe_symlink_target.c | 5 | ||||
-rw-r--r-- | archival/unzip.c | 5 | ||||
-rw-r--r-- | include/bb_archive.h | 3 |
3 files changed, 9 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; |
diff --git a/include/bb_archive.h b/include/bb_archive.h index 7d70ac086..b2cb7b347 100644 --- a/include/bb_archive.h +++ b/include/bb_archive.h | |||
@@ -213,6 +213,9 @@ void seek_by_jump(int fd, off_t amount) FAST_FUNC; | |||
213 | void seek_by_read(int fd, off_t amount) FAST_FUNC; | 213 | void seek_by_read(int fd, off_t amount) FAST_FUNC; |
214 | 214 | ||
215 | const char *strip_unsafe_prefix(const char *str) FAST_FUNC; | 215 | const char *strip_unsafe_prefix(const char *str) FAST_FUNC; |
216 | #if ENABLE_PLATFORM_MINGW32 | ||
217 | #define create_or_remember_link(lp, t, ln, hl) create_or_remember_link(t, ln) | ||
218 | #endif | ||
216 | void create_or_remember_link(llist_t **link_placeholders, | 219 | void create_or_remember_link(llist_t **link_placeholders, |
217 | const char *target, | 220 | const char *target, |
218 | const char *linkname, | 221 | const char *linkname, |