aboutsummaryrefslogtreecommitdiff
path: root/archival/libarchive
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libarchive')
-rw-r--r--archival/libarchive/decompress_gunzip.c6
-rw-r--r--archival/libarchive/open_transformer.c26
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
1121static int check_header_gzip(STATE_PARAM transformer_state_t *xstate) 1124static 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
1193IF_DESKTOP(long long) int FAST_FUNC 1199IF_DESKTOP(long long) int FAST_FUNC
1194unpack_gz_stream(transformer_state_t *xstate) 1200unpack_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
68void check_errors_in_children(int signo) 69void 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 */
156void check_errors_in_children(int signo UNUSED_PARAM)
157{
158 bb_got_signal = 0;
159}
160
161void 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