summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/elfutils/files/0003-musl-utils.patch')
-rw-r--r--meta/recipes-devtools/elfutils/files/0003-musl-utils.patch95
1 files changed, 0 insertions, 95 deletions
diff --git a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
deleted file mode 100644
index d8961f6293..0000000000
--- a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
+++ /dev/null
@@ -1,95 +0,0 @@
1From b1c956cd739f364c4a80381578ddaba43e36903b Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:19:48 +0800
4Subject: [PATCH] musl-utils
5
6Provide missing defines which otherwise are available on glibc system headers
7
8Alter the error API to match posix version
9use qsort instead of qsort_r which is glibc specific API
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Upstream-Status: Inappropriate [workaround for musl]
13
14Rebase to 0.177
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16---
17 src/arlib.h | 6 ++++++
18 src/elfcompress.c | 7 +++++++
19 src/strip.c | 7 +++++++
20 src/unstrip.c | 9 +++++++++
21 4 files changed, 29 insertions(+)
22
23diff --git a/src/arlib.h b/src/arlib.h
24index d4a4221..f6336d9 100644
25--- a/src/arlib.h
26+++ b/src/arlib.h
27@@ -29,6 +29,12 @@
28 #include <stdint.h>
29 #include <sys/types.h>
30
31+#if !defined(ALLPERMS)
32+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
33+#endif
34+#if !defined(DEFFILEMODE)
35+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
36+#endif
37
38 /* State of -D/-U flags. */
39 extern bool arlib_deterministic_output;
40diff --git a/src/elfcompress.c b/src/elfcompress.c
41index f771b92..263de62 100644
42--- a/src/elfcompress.c
43+++ b/src/elfcompress.c
44@@ -37,6 +37,13 @@
45 #include "libeu.h"
46 #include "printversion.h"
47
48+#if !defined(ALLPERMS)
49+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
50+#endif
51+#if !defined(FNM_EXTMATCH)
52+# define FNM_EXTMATCH (0)
53+#endif
54+
55 /* Name and version of program. */
56 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
57
58diff --git a/src/strip.c b/src/strip.c
59index 403e0f6..738e948 100644
60--- a/src/strip.c
61+++ b/src/strip.c
62@@ -45,6 +45,13 @@
63 #include <system.h>
64 #include <printversion.h>
65
66+#if !defined(ACCESSPERMS)
67+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
68+#endif
69+#if !defined(FNM_EXTMATCH)
70+# define FNM_EXTMATCH (0)
71+#endif
72+
73 typedef uint8_t GElf_Byte;
74
75 /* Name and version of program. */
76diff --git a/src/unstrip.c b/src/unstrip.c
77index d70053d..b8a6ff3 100644
78--- a/src/unstrip.c
79+++ b/src/unstrip.c
80@@ -51,6 +51,15 @@
81 #include "libeu.h"
82 #include "printversion.h"
83
84+#ifndef strndupa
85+#define strndupa(s, n) \
86+ ({const char *__in = (s); \
87+ size_t __len = strnlen (__in, (n)) + 1; \
88+ char *__out = (char *) alloca (__len); \
89+ __out[__len-1] = '\0'; \
90+ (char *) memcpy (__out, __in, __len-1);})
91+#endif
92+
93 /* Name and version of program. */
94 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
95