wok-4.x view busybox/stuff/patches/busybox-1.23-zmodules.u @ rev 12466

New toolchain GCC 4.9.2, Glibc 2.19, Binutils 2.23.1
author Stanislas Leduc <shann@slitaz.org>
date Wed Nov 09 15:12:00 2022 +0000 (18 months ago)
parents
children
line source
1 Add LZMA_DEFAULT_MAGIC support
2 --- busybox-1.23/archival/libarchive/open_transformer.c
3 +++ busybox-1.23/archival/libarchive/open_transformer.c
4 @@ -178,6 +178,22 @@
5 /* .gz and .bz2 both have 2-byte signature, and their
6 * unpack_XXX_stream wants this header skipped. */
7 xread(fd, magic.b16, sizeof(magic.b16[0]));
8 +#if 1
9 +// SliTaz uses .gz suffix for lzma'd kernel modules
10 +#if BB_BIG_ENDIAN
11 +#define LZMA_DEFAULT_MAGIC 0x5d00
12 +#else
13 +#define LZMA_DEFAULT_MAGIC 0x5d
14 +#endif
15 + if (ENABLE_FEATURE_SEAMLESS_LZMA
16 + && magic.b16[0] == LZMA_DEFAULT_MAGIC
17 + ) {
18 + xlseek(fd, offset, SEEK_CUR);
19 + xstate->xformer = unpack_lzma_stream;
20 + USE_FOR_NOMMU(xstate->xformer_prog = "unlzma";)
21 + goto found_magic;
22 + }
23 +#endif
24 if (ENABLE_FEATURE_SEAMLESS_GZ
25 && magic.b16[0] == GZIP_MAGIC
26 ) {