summaryrefslogtreecommitdiff
path: root/experimental/elfutils/musl-strerror_r.patch
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-07-18 06:15:43 -0400
committerMax Rees <maxcrees@me.com>2019-08-07 18:07:49 -0500
commit420a64fe15922629a54e7d38cdedbf1fc86ee8ff (patch)
tree2b526e9b9426734eff19ca295dd42a91f37811a1 /experimental/elfutils/musl-strerror_r.patch
parent17ca3641eaad94f05d1c9f66593c67e425268050 (diff)
downloadpackages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.tar.gz
packages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.tar.bz2
packages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.tar.xz
packages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.zip
experimental/elfutils: new package
Diffstat (limited to 'experimental/elfutils/musl-strerror_r.patch')
-rw-r--r--experimental/elfutils/musl-strerror_r.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/experimental/elfutils/musl-strerror_r.patch b/experimental/elfutils/musl-strerror_r.patch
new file mode 100644
index 000000000..72977951d
--- /dev/null
+++ b/experimental/elfutils/musl-strerror_r.patch
@@ -0,0 +1,19 @@
+--- a/libdwfl/dwfl_error.c 2015-09-29 17:18:51.000000000 +0200
++++ b/libdwfl/dwfl_error.c 2015-11-20 05:11:29.889002058 +0100
+@@ -154,7 +154,16 @@
+ switch (error &~ 0xffff)
+ {
+ case OTHER_ERROR (ERRNO):
++#if defined(__GLIBC__)
+ return strerror_r (error & 0xffff, "bad", 0);
++#else
++ {
++ static __thread char buf[128] = "";
++ if (0 == strerror_r(error & 0xffff, buf, sizeof(buf)))
++ return buf;
++ }
++ return "strerror_r() failed";
++#endif
+ case OTHER_ERROR (LIBELF):
+ return elf_errmsg (error & 0xffff);
+ case OTHER_ERROR (LIBDW):