summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files/musl.patch
blob: be35791b1af1d02eced2dd956a797bb7028d9da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 <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;