diff options
author | Rosen Penev <rosenp@gmail.com> | 2019-09-05 16:57:39 -0700 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2019-09-21 01:09:30 +0200 |
commit | f4da28c301890115e5c6b632aa6550fbc59f8e24 (patch) | |
tree | 42cc46b379a94565be6d3d33e0a2e7a54abed1d8 /package/libs/elfutils/patches/100-musl-compat.patch | |
parent | 89fe1dfac2862297dffc94966a9b0f12237eae55 (diff) | |
download | upstream-f4da28c301890115e5c6b632aa6550fbc59f8e24.tar.gz upstream-f4da28c301890115e5c6b632aa6550fbc59f8e24.tar.bz2 upstream-f4da28c301890115e5c6b632aa6550fbc59f8e24.zip |
elfutils: Add host build
Needed for glib2 host build:
gresource-tool.c:32:20: fatal error: libelf.h: No such file or directory
#include <libelf.h>
Changed PKG_LICENSE to the SPDX version.
Switched build dependency for argp-standalone to !USE_GLIBC. argp is a
glibc extension. Treat it as such.
Adjusted patch to use strerror_l, which works properly with both glibc
and musl. The patch errors under glibc with:
dwfl_error.c:158:7: error: ignoring return value of 'strerror_r', declared
with attribute warn_unused_result [-Werror=unused-result]
strerror_r (error & 0xffff, s, sizeof(s));
void casting does not fix the error.
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.patch | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch index 9631ce05d6..109b7ece08 100644 --- a/package/libs/elfutils/patches/100-musl-compat.patch +++ b/package/libs/elfutils/patches/100-musl-compat.patch @@ -44,21 +44,12 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002 } --- a/libdwfl/dwfl_error.c +++ b/libdwfl/dwfl_error.c -@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error) - const char * - dwfl_errmsg (int error) - { -+ static __thread char s[64] = ""; - if (error == 0 || error == -1) - { - int last_error = global_error; -@@ -154,7 +155,8 @@ dwfl_errmsg (int error) +@@ -154,7 +154,7 @@ dwfl_errmsg (int error) switch (error &~ 0xffff) { case OTHER_ERROR (ERRNO): - return strerror_r (error & 0xffff, "bad", 0); -+ strerror_r (error & 0xffff, s, sizeof(s)); -+ return s; ++ return strerror_l (error & 0xffff, LC_GLOBAL_LOCALE); case OTHER_ERROR (LIBELF): return elf_errmsg (error & 0xffff); case OTHER_ERROR (LIBDW): |