diff options
Diffstat (limited to 'app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch')
-rw-r--r-- | app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch b/app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch new file mode 100644 index 000000000000..085c61aa4e71 --- /dev/null +++ b/app-arch/rpm2targz/files/rpm2targz-9.0.0.5g-add-zstd-support.patch @@ -0,0 +1,20 @@ +Origin: https://bugs.gentoo.org/719208 +Author: Rafał Mużyło + +--- a/rpmoffset.c ++++ b/rpmoffset.c +@@ -58,11 +58,13 @@ int is_magic_lzma(const char *buf) + static const unsigned char magic_gzip[] = { '\037', '\213', '\010' }; + static const unsigned char magic_bzip2[] = { 'B', 'Z', 'h' }; + static const unsigned char magic_xz[] = { 0xFD, '7', 'z', 'X', 'Z', 0x00 }; ++static const unsigned char magic_zstd[] = { 0x28, 0xB5, 0x2F, 0xFD }; + static const magic_t magics[] = { + #define DECLARE_MAGIC_T(t) { .type = #t, .magic = magic_##t, .len = sizeof(magic_##t), }, + DECLARE_MAGIC_T(gzip) + DECLARE_MAGIC_T(bzip2) + DECLARE_MAGIC_T(xz) ++ DECLARE_MAGIC_T(zstd) + #undef DECLARE_MAGIC_T + }; + #define MAGIC_SIZE_MIN 3 + |