aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-21 14:08:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-21 14:08:33 +0000
commitb88af1237cf23f0a4e89bf16b968d0fe9f6af5e8 (patch)
treebd8817b69054cced01ee4c426f0a2eb29ebb6f3e /package
parentce0c7e23c2a0b9b423d10de713564f46dfeef981 (diff)
downloadmaster-187ad058-b88af1237cf23f0a4e89bf16b968d0fe9f6af5e8.tar.gz
master-187ad058-b88af1237cf23f0a4e89bf16b968d0fe9f6af5e8.tar.bz2
master-187ad058-b88af1237cf23f0a4e89bf16b968d0fe9f6af5e8.zip
elfutils: fix compatibility with non-glibc builds
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48429 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/libs/elfutils/patches/110-elf_compressed_header_support.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/libs/elfutils/patches/110-elf_compressed_header_support.patch b/package/libs/elfutils/patches/110-elf_compressed_header_support.patch
new file mode 100644
index 0000000000..419e694646
--- /dev/null
+++ b/package/libs/elfutils/patches/110-elf_compressed_header_support.patch
@@ -0,0 +1,33 @@
+--- a/libelf/libelf.h
++++ b/libelf/libelf.h
+@@ -36,6 +36,30 @@
+ /* Get the ELF types. */
+ #include <elf.h>
+
++#ifndef ELFCOMPRESS_ZLIB
++typedef struct
++{
++ Elf32_Word ch_type; /* Compression format. */
++ Elf32_Word ch_size; /* Uncompressed data size. */
++ Elf32_Word ch_addralign; /* Uncompressed data alignment. */
++} Elf32_Chdr;
++
++typedef struct
++{
++ Elf64_Word ch_type; /* Compression format. */
++ Elf64_Word ch_reserved;
++ Elf64_Xword ch_size; /* Uncompressed data size. */
++ Elf64_Xword ch_addralign; /* Uncompressed data alignment. */
++} Elf64_Chdr;
++
++/* Legal values for ch_type (compression algorithm). */
++#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */
++#define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */
++#define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */
++#define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */
++#define ELFCOMPRESS_HIPROC 0x7fffffff /* End of processor-specific. */
++#endif
++
+ #ifndef _LIBC
+ #ifndef __mempcpy
+ #define __mempcpy mempcpy