summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2018-06-30 23:08:36 -0500
committerMatthias Maier <tamiko@gentoo.org>2018-06-30 23:11:31 -0500
commit29741bb4addc99eb6271754698151704cfebbec3 (patch)
treeb7a20b90954e181b6b0210a0d8bff4148c21eb5a /sys-libs/libunwind
parentdev-lang/julia: version bump to 0.6.3 (diff)
downloadgentoo-29741bb4addc99eb6271754698151704cfebbec3.tar.gz
gentoo-29741bb4addc99eb6271754698151704cfebbec3.tar.bz2
gentoo-29741bb4addc99eb6271754698151704cfebbec3.zip
sys-libs/libunwind: fix compilation with musl
Package-Manager: Portage-2.3.41, Repoman-2.3.9
Diffstat (limited to 'sys-libs/libunwind')
-rw-r--r--sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch51
-rw-r--r--sys-libs/libunwind/libunwind-1.2.1-r1.ebuild1
2 files changed, 52 insertions, 0 deletions
diff --git a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
new file mode 100644
index 000000000000..ee11149771cd
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
@@ -0,0 +1,51 @@
+From 0f3f41a86842f2b19aa07af5242cb775ef9b20d3 Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy@gentoo.org>
+Date: Sat, 30 Jun 2018 22:44:22 -0500
+Subject: [PATCH] Only include execinfo.h where avaliable
+
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+---
+ tests/test-coredump-unwind.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
+index 5254708..33f92b0 100644
+--- a/tests/test-coredump-unwind.c
++++ b/tests/test-coredump-unwind.c
+@@ -57,7 +57,9 @@
+ #include <grp.h>
+
+ /* For SIGSEGV handler code */
++#if HAVE_EXECINFO_H
+ #include <execinfo.h>
++#endif
+ #include <sys/ucontext.h>
+
+ #include <libunwind-coredump.h>
+@@ -202,7 +204,7 @@ void die_out_of_memory(void)
+ /* End of utility logging functions */
+
+
+-
++#if HAVE_EXECINFO_H
+ static
+ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
+ {
+@@ -249,12 +251,14 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
+
+ _exit(1);
+ }
+-
++#endif
+ static void install_sigsegv_handler(void)
+ {
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
++#if HAVE_EXECINFO_H
+ sa.sa_sigaction = handle_sigsegv;
++#endif
+ sa.sa_flags = SA_SIGINFO;
+ sigaction(SIGSEGV, &sa, NULL);
+ sigaction(SIGILL, &sa, NULL);
+--
+2.18.0
diff --git a/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild
index 8bdde358d133..a4690fc050ec 100644
--- a/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild
+++ b/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild
@@ -48,6 +48,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.2-ia64-ptrace-coredump.patch
"${FILESDIR}"/${PN}-1.2-ia64-missing.patch
"${FILESDIR}"/${PN}-1.2.1-fix_version_macros.patch
+ "${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch
)
src_prepare() {