diff options
Diffstat (limited to 'archival/libarchive')
-rw-r--r-- | archival/libarchive/decompress_gunzip.c | 6 | ||||
-rw-r--r-- | archival/libarchive/open_transformer.c | 26 |
2 files changed, 32 insertions, 0 deletions
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c index c7fa5b526..74d364379 100644 --- a/archival/libarchive/decompress_gunzip.c +++ b/archival/libarchive/decompress_gunzip.c | |||
@@ -1118,6 +1118,9 @@ static uint32_t buffer_read_le_u32(STATE_PARAM_ONLY) | |||
1118 | return res; | 1118 | return res; |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | #if ENABLE_PLATFORM_MINGW32 && __GNUC__ | ||
1122 | #pragma pack(2) | ||
1123 | #endif | ||
1121 | static int check_header_gzip(STATE_PARAM transformer_state_t *xstate) | 1124 | static int check_header_gzip(STATE_PARAM transformer_state_t *xstate) |
1122 | { | 1125 | { |
1123 | union { | 1126 | union { |
@@ -1189,6 +1192,9 @@ static int check_header_gzip(STATE_PARAM transformer_state_t *xstate) | |||
1189 | } | 1192 | } |
1190 | return 1; | 1193 | return 1; |
1191 | } | 1194 | } |
1195 | #if ENABLE_PLATFORM_MINGW32 && __GNUC__ | ||
1196 | #pragma pack() | ||
1197 | #endif | ||
1192 | 1198 | ||
1193 | IF_DESKTOP(long long) int FAST_FUNC | 1199 | IF_DESKTOP(long long) int FAST_FUNC |
1194 | unpack_gz_stream(transformer_state_t *xstate) | 1200 | unpack_gz_stream(transformer_state_t *xstate) |
diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c index ac7e5db95..641256787 100644 --- a/archival/libarchive/open_transformer.c +++ b/archival/libarchive/open_transformer.c | |||
@@ -65,6 +65,7 @@ ssize_t FAST_FUNC xtransformer_write(transformer_state_t *xstate, const void *bu | |||
65 | return nwrote; | 65 | return nwrote; |
66 | } | 66 | } |
67 | 67 | ||
68 | #if !ENABLE_PLATFORM_MINGW32 | ||
68 | void check_errors_in_children(int signo) | 69 | void check_errors_in_children(int signo) |
69 | { | 70 | { |
70 | int status; | 71 | int status; |
@@ -151,6 +152,31 @@ void FAST_FUNC fork_transformer(int fd, const char *transform_prog) | |||
151 | close(fd_pipe.wr); /* don't want to write to the child */ | 152 | close(fd_pipe.wr); /* don't want to write to the child */ |
152 | xmove_fd(fd_pipe.rd, fd); | 153 | xmove_fd(fd_pipe.rd, fd); |
153 | } | 154 | } |
155 | #else /* ENABLE_PLATFORM_MINGW */ | ||
156 | void check_errors_in_children(int signo UNUSED_PARAM) | ||
157 | { | ||
158 | bb_got_signal = 0; | ||
159 | } | ||
160 | |||
161 | void FAST_FUNC fork_transformer(int fd, const char *transform_prog) | ||
162 | { | ||
163 | char *cmd; | ||
164 | int fd1; | ||
165 | |||
166 | if (find_applet_by_name(transform_prog) >= 0) { | ||
167 | cmd = xasprintf("%s --busybox %s -cf -", bb_busybox_exec_path, | ||
168 | transform_prog); | ||
169 | } | ||
170 | else { | ||
171 | cmd = xasprintf("%s -cf -", transform_prog); | ||
172 | } | ||
173 | if ( (fd1=mingw_popen_fd(cmd, "r", fd, NULL)) == -1 ) { | ||
174 | bb_perror_msg_and_die("can't execute '%s'", transform_prog); | ||
175 | } | ||
176 | free(cmd); | ||
177 | xmove_fd(fd1, fd); | ||
178 | } | ||
179 | #endif | ||
154 | 180 | ||
155 | 181 | ||
156 | #if SEAMLESS_COMPRESSION | 182 | #if SEAMLESS_COMPRESSION |