aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/elfutils/patches/100-musl-compat.patch
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-04-05 19:02:38 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2020-04-13 22:40:19 +0200
commitd27623b542548b765ddd46b046169006a3b5f66f (patch)
treed31289ad2ca24bfcb6a9c6a92780ea4f7a7c47fb /package/libs/elfutils/patches/100-musl-compat.patch
parent76d22fc24b4d4a7e93b722af3005cc38bdef8111 (diff)
downloadupstream-d27623b542548b765ddd46b046169006a3b5f66f.tar.gz
upstream-d27623b542548b765ddd46b046169006a3b5f66f.tar.bz2
upstream-d27623b542548b765ddd46b046169006a3b5f66f.zip
elfutils: update to 0.179
Removed sys/cdefs usage. The header is deprecated. Removed canonicalize_file_name define. It's already fixed upstream. Added --disable-debuginfod. Seems to be needed. Modified patch 005 to build more stuff. It was failing before. It still only builds libraries. Modified patch 100 to use strerror under non-glibc. It is used under glibc as strerror is not thread safe. It is under musl and uClibc-ng. strerror_l is not available under uClibc-ng. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'package/libs/elfutils/patches/100-musl-compat.patch')
-rw-r--r--package/libs/elfutils/patches/100-musl-compat.patch22
1 files changed, 7 insertions, 15 deletions
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch
index 109b7ece08..374e832d3f 100644
--- a/package/libs/elfutils/patches/100-musl-compat.patch
+++ b/package/libs/elfutils/patches/100-musl-compat.patch
@@ -22,20 +22,9 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
#include <stddef.h>
#include <stdint.h>
#include <sys/param.h>
-@@ -38,6 +49,10 @@
- #include <byteswap.h>
- #include <unistd.h>
-
-+#ifndef __GLIBC__
-+#define canonicalize_file_name(name) realpath(name,NULL)
-+#endif
-+
- #if __BYTE_ORDER == __LITTLE_ENDIAN
- # define LE32(n) (n)
- # define LE64(n) (n)
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
-@@ -73,5 +73,5 @@ __attribute ((noreturn)) attribute_hidde
+@@ -147,5 +147,5 @@ __attribute ((noreturn)) attribute_hidde
__libdw_oom (void)
{
while (1)
@@ -44,12 +33,15 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
}
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
-@@ -154,7 +154,7 @@ dwfl_errmsg (int error)
+@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
switch (error &~ 0xffff)
{
case OTHER_ERROR (ERRNO):
-- return strerror_r (error & 0xffff, "bad", 0);
-+ return strerror_l (error & 0xffff, LC_GLOBAL_LOCALE);
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ return strerror_r (error & 0xffff, "bad", 0);
++#else
++ return strerror (error & 0xffff);
++#endif
case OTHER_ERROR (LIBELF):
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):