diff options
author | Ron Yorston <rmy@pobox.com> | 2016-05-25 08:54:30 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-05-25 08:54:30 +0100 |
commit | 7ff0648275a752db9ab33c2e1708e475b5831675 (patch) | |
tree | cb935595e91283ee5aa3d033382c3b3a6a8b88de | |
parent | 53c3b087b078e040705a68d085644b7ca060962a (diff) | |
download | busybox-w32-7ff0648275a752db9ab33c2e1708e475b5831675.tar.gz busybox-w32-7ff0648275a752db9ab33c2e1708e475b5831675.tar.bz2 busybox-w32-7ff0648275a752db9ab33c2e1708e475b5831675.zip |
Fix for MinGW-w64
Limit the scope of '#pragma pack(2)', otherwise gunzip fails on
64-bit Windows.
-rw-r--r-- | archival/libarchive/decompress_gunzip.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c index eb64645ae..94dbd7a95 100644 --- a/archival/libarchive/decompress_gunzip.c +++ b/archival/libarchive/decompress_gunzip.c | |||
@@ -36,9 +36,6 @@ | |||
36 | #include <setjmp.h> | 36 | #include <setjmp.h> |
37 | #include "libbb.h" | 37 | #include "libbb.h" |
38 | #include "bb_archive.h" | 38 | #include "bb_archive.h" |
39 | #if ENABLE_PLATFORM_MINGW32 && __GNUC__ | ||
40 | #pragma pack(2) | ||
41 | #endif | ||
42 | 39 | ||
43 | typedef struct huft_t { | 40 | typedef struct huft_t { |
44 | unsigned char e; /* number of extra bits or operation */ | 41 | unsigned char e; /* number of extra bits or operation */ |
@@ -1121,6 +1118,9 @@ static uint32_t buffer_read_le_u32(STATE_PARAM_ONLY) | |||
1121 | return res; | 1118 | return res; |
1122 | } | 1119 | } |
1123 | 1120 | ||
1121 | #if ENABLE_PLATFORM_MINGW32 && __GNUC__ | ||
1122 | #pragma pack(2) | ||
1123 | #endif | ||
1124 | static int check_header_gzip(STATE_PARAM transformer_state_t *xstate) | 1124 | static int check_header_gzip(STATE_PARAM transformer_state_t *xstate) |
1125 | { | 1125 | { |
1126 | union { | 1126 | union { |
@@ -1192,6 +1192,9 @@ static int check_header_gzip(STATE_PARAM transformer_state_t *xstate) | |||
1192 | } | 1192 | } |
1193 | return 1; | 1193 | return 1; |
1194 | } | 1194 | } |
1195 | #if ENABLE_PLATFORM_MINGW32 && __GNUC__ | ||
1196 | #pragma pack() | ||
1197 | #endif | ||
1195 | 1198 | ||
1196 | IF_DESKTOP(long long) int FAST_FUNC | 1199 | IF_DESKTOP(long long) int FAST_FUNC |
1197 | unpack_gz_stream(transformer_state_t *xstate) | 1200 | unpack_gz_stream(transformer_state_t *xstate) |