diff options
Diffstat (limited to 'libbb/read.c')
-rw-r--r-- | libbb/read.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/read.c b/libbb/read.c index 9f6bfcd1b..815007c1e 100644 --- a/libbb/read.c +++ b/libbb/read.c | |||
@@ -338,12 +338,16 @@ int FAST_FUNC open_zipped(const char *fname) | |||
338 | /* .gz and .bz2 both have 2-byte signature, and their | 338 | /* .gz and .bz2 both have 2-byte signature, and their |
339 | * unpack_XXX_stream want this header skipped. */ | 339 | * unpack_XXX_stream want this header skipped. */ |
340 | xread(fd, &magic, 2); | 340 | xread(fd, &magic, 2); |
341 | #if ENABLE_FEATURE_SEAMLESS_GZ | ||
341 | #if BB_MMU | 342 | #if BB_MMU |
342 | xformer = unpack_gz_stream; | 343 | xformer = unpack_gz_stream; |
343 | #else | 344 | #else |
344 | xformer_prog = "gunzip"; | 345 | xformer_prog = "gunzip"; |
345 | #endif | 346 | #endif |
346 | if (magic[0] != 0x1f || magic[1] != 0x8b) { | 347 | #endif |
348 | if (!ENABLE_FEATURE_SEAMLESS_GZ | ||
349 | || magic[0] != 0x1f || magic[1] != 0x8b | ||
350 | ) { | ||
347 | if (!ENABLE_FEATURE_SEAMLESS_BZ2 | 351 | if (!ENABLE_FEATURE_SEAMLESS_BZ2 |
348 | || magic[0] != 'B' || magic[1] != 'Z' | 352 | || magic[0] != 'B' || magic[1] != 'Z' |
349 | ) { | 353 | ) { |