Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | Fix error on musl: |
| 2 | |
| 3 | | ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main': |
| 4 | | ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'? |
| 5 | | fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS); |
| 6 | | ^~~~~~~~ |
| 7 | | EPERM |
| 8 | | ../../elfutils-0.176/tests/elfstrmerge.c:370:60: note: each undeclared identifier is reported only once for each function it appears in |
| 9 | |
| 10 | Upstream-Status: Inappropriate [workaround in musl] |
| 11 | |
| 12 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 13 | |
| 14 | Index: elfutils-0.176/tests/elfstrmerge.c |
| 15 | =================================================================== |
| 16 | --- elfutils-0.176.orig/tests/elfstrmerge.c |
| 17 | +++ elfutils-0.176/tests/elfstrmerge.c |
| 18 | @@ -33,6 +33,11 @@ |
| 19 | #include ELFUTILS_HEADER(dwelf) |
| 20 | #include "elf-knowledge.h" |
| 21 | |
| 22 | +/* for musl */ |
| 23 | +#ifndef ALLPERMS |
| 24 | +# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ |
| 25 | +#endif |
| 26 | + |
| 27 | /* The original ELF file. */ |
| 28 | static int fd = -1; |
| 29 | static Elf *elf = NULL; |