summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/elfutils/files/0002-musl-libs.patch')
-rw-r--r--meta/recipes-devtools/elfutils/files/0002-musl-libs.patch30
1 files changed, 4 insertions, 26 deletions
diff --git a/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch b/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
index c6f766f680..b373940d37 100644
--- a/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
+++ b/meta/recipes-devtools/elfutils/files/0002-musl-libs.patch
@@ -1,4 +1,4 @@
1From f4ca9db9d38f865505322595a8a1e8f69d5bb87c Mon Sep 17 00:00:00 2001 1From 18c527991deee93170a887b6da622560d5606913 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 23 Aug 2019 10:18:47 +0800 3Date: Fri, 23 Aug 2019 10:18:47 +0800
4Subject: [PATCH] musl-libs 4Subject: [PATCH] musl-libs
@@ -19,10 +19,9 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19 lib/error.h | 27 +++++++++++++++++++++++++++ 19 lib/error.h | 27 +++++++++++++++++++++++++++
20 lib/fixedsizehash.h | 1 - 20 lib/fixedsizehash.h | 1 -
21 lib/libeu.h | 1 + 21 lib/libeu.h | 1 +
22 libdwfl/dwfl_error.c | 9 +++++++++
23 libdwfl/linux-kernel-modules.c | 1 + 22 libdwfl/linux-kernel-modules.c | 1 +
24 libelf/elf.h | 7 +++++++ 23 libelf/elf.h | 7 +++++++
25 6 files changed, 45 insertions(+), 1 deletion(-) 24 5 files changed, 36 insertions(+), 1 deletion(-)
26 create mode 100644 lib/error.h 25 create mode 100644 lib/error.h
27 26
28diff --git a/lib/error.h b/lib/error.h 27diff --git a/lib/error.h b/lib/error.h
@@ -82,27 +81,6 @@ index ecb4d01..edc85e3 100644
82 #include <stddef.h> 81 #include <stddef.h>
83 #include <stdint.h> 82 #include <stdint.h>
84 83
85diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c
86index 7bcf61c..11dcc8b 100644
87--- a/libdwfl/dwfl_error.c
88+++ b/libdwfl/dwfl_error.c
89@@ -154,7 +154,16 @@ dwfl_errmsg (int error)
90 switch (error &~ 0xffff)
91 {
92 case OTHER_ERROR (ERRNO):
93+#if defined(__GLIBC__)
94 return strerror_r (error & 0xffff, "bad", 0);
95+#else
96+ {
97+ static __thread char buf[128] = "";
98+ if (strerror_r (error & 0xffff, buf, sizeof(buf)) == 0)
99+ return buf;
100+ }
101+ return "strerror_r() failed";
102+#endif
103 case OTHER_ERROR (LIBELF):
104 return elf_errmsg (error & 0xffff);
105 case OTHER_ERROR (LIBDW):
106diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c 84diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
107index 6edb27f..f331e3c 100644 85index 6edb27f..f331e3c 100644
108--- a/libdwfl/linux-kernel-modules.c 86--- a/libdwfl/linux-kernel-modules.c
@@ -116,7 +94,7 @@ index 6edb27f..f331e3c 100644
116 /* If fts.h is included before config.h, its indirect inclusions may not 94 /* If fts.h is included before config.h, its indirect inclusions may not
117 give us the right LFS aliases of these functions, so map them manually. */ 95 give us the right LFS aliases of these functions, so map them manually. */
118diff --git a/libelf/elf.h b/libelf/elf.h 96diff --git a/libelf/elf.h b/libelf/elf.h
119index 6439c1a..a87c589 100644 97index 8e3e618..1353890 100644
120--- a/libelf/elf.h 98--- a/libelf/elf.h
121+++ b/libelf/elf.h 99+++ b/libelf/elf.h
122@@ -19,6 +19,10 @@ 100@@ -19,6 +19,10 @@
@@ -130,7 +108,7 @@ index 6439c1a..a87c589 100644
130 /* Standard ELF types. */ 108 /* Standard ELF types. */
131 109
132 #include <stdint.h> 110 #include <stdint.h>
133@@ -4101,4 +4105,7 @@ enum 111@@ -4102,4 +4106,7 @@ enum
134 #define R_ARC_TLS_LE_S9 0x4a 112 #define R_ARC_TLS_LE_S9 0x4a
135 #define R_ARC_TLS_LE_32 0x4b 113 #define R_ARC_TLS_LE_32 0x4b
136 114