From 13f45af4a460a668524c3ac6b133d5b51d8e72dc Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 May 2019 22:15:03 +0100 Subject: elfutils: Fix ptest compile failures on musl (From OE-Core rev: 0f3bb3541a01701820b52ee31b41d4a24ddd1d43) Signed-off-by: Richard Purdie --- meta/recipes-devtools/elfutils/files/musl.patch | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 meta/recipes-devtools/elfutils/files/musl.patch (limited to 'meta/recipes-devtools/elfutils/files/musl.patch') diff --git a/meta/recipes-devtools/elfutils/files/musl.patch b/meta/recipes-devtools/elfutils/files/musl.patch new file mode 100644 index 0000000000..be35791b1a --- /dev/null +++ b/meta/recipes-devtools/elfutils/files/musl.patch @@ -0,0 +1,29 @@ +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 + +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; -- cgit v1.2.3-54-g00ecf