aboutsummaryrefslogtreecommitdiffstats
path: root/testing/elfutils/musl-strerror_r.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-02-13 17:05:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-02-14 18:50:06 +0000
commit69a9add8425a3ac8a4ce5294354a543c63d35e39 (patch)
tree1cb92f6d6bf1e7d89587d0a66e85fbc74be41372 /testing/elfutils/musl-strerror_r.patch
parent7fac29dc3dc6a41096bf5f204c541b70f967291e (diff)
downloadaports-69a9add8425a3ac8a4ce5294354a543c63d35e39.tar.gz
aports-69a9add8425a3ac8a4ce5294354a543c63d35e39.tar.bz2
aports-69a9add8425a3ac8a4ce5294354a543c63d35e39.tar.xz
testing/elfutils: new aport
A collection of utilities and DSOs to handle ELF files and DWARF data http://elfutils.org/
Diffstat (limited to 'testing/elfutils/musl-strerror_r.patch')
-rw-r--r--testing/elfutils/musl-strerror_r.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/elfutils/musl-strerror_r.patch b/testing/elfutils/musl-strerror_r.patch
new file mode 100644
index 0000000000..72977951d5
--- /dev/null
+++ b/testing/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):