Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame^] | 1 | From 72819106d0e5666d172d39c24c19e4e7a3b8be0e Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 3 | Date: Wed, 1 May 2019 22:15:03 +0100 |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 4 | Subject: [PATCH] Fix error on musl: |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | |
| 6 | | ../../elfutils-0.176/tests/elfstrmerge.c: In function 'main': |
| 7 | | ../../elfutils-0.176/tests/elfstrmerge.c:370:60: error: 'ALLPERMS' undeclared (first use in this function); did you mean 'EPERM'? |
| 8 | | fdnew = open (fnew, O_WRONLY | O_CREAT, st.st_mode & ALLPERMS); |
| 9 | | ^~~~~~~~ |
| 10 | | EPERM |
| 11 | | ../../elfutils-0.176/tests/elfstrmerge.c:370:60: note: each undeclared identifier is reported only once for each function it appears in |
| 12 | |
| 13 | Upstream-Status: Inappropriate [workaround in musl] |
| 14 | |
| 15 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 16 | |
| 17 | --- |
| 18 | tests/elfstrmerge.c | 5 +++++ |
| 19 | 1 file changed, 5 insertions(+) |
| 20 | |
| 21 | diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame^] | 22 | index 197c6a5..3683672 100644 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | --- a/tests/elfstrmerge.c |
| 24 | +++ b/tests/elfstrmerge.c |
| 25 | @@ -33,6 +33,11 @@ |
| 26 | #include ELFUTILS_HEADER(dwelf) |
| 27 | #include "elf-knowledge.h" |
| 28 | |
| 29 | +/* for musl */ |
| 30 | +#ifndef ALLPERMS |
| 31 | +# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ |
| 32 | +#endif |
| 33 | + |
| 34 | /* The original ELF file. */ |
| 35 | static int fd = -1; |
| 36 | static Elf *elf = NULL; |