Files
poky/meta/recipes-devtools/elfutils/files/musl-tests.patch
Khem Raj d5b73bdb45 elfutils: Fix eu-* utils builds for musl
Re-organize the musl patches in three different areas namely
libs, utils and tests, this will help maintain them in future
version bumps

Add obstack dependency on musl targets which is needed for eu-*

PN and PN-binutils is not empty anymore on musl

(From OE-Core rev: a747239978e63f22d4107e6e12c75b5f78043cce)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-23 22:26:28 +01:00

30 lines
1.1 KiB
Diff

Fix error on musl:
| ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main':
| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'?
| fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS);
| ^~~~~~~~
| EPERM
| ../../elfutils-0.176/tests/elfstrmerge.c:370:60: note: each undeclared identifier is reported only once for each function it appears in
Upstream-Status: Inappropriate [workaround in musl]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: elfutils-0.176/tests/elfstrmerge.c
===================================================================
--- elfutils-0.176.orig/tests/elfstrmerge.c
+++ elfutils-0.176/tests/elfstrmerge.c
@@ -33,6 +33,11 @@
#include ELFUTILS_HEADER(dwelf)
#include "elf-knowledge.h"
+/* for musl */
+#ifndef ALLPERMS
+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
+#endif
+
/* The original ELF file. */
static int fd = -1;
static Elf *elf = NULL;