commit: 29741bb4addc99eb6271754698151704cfebbec3 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> AuthorDate: Sun Jul 1 04:08:36 2018 +0000 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> CommitDate: Sun Jul 1 04:11:31 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29741bb4
sys-libs/libunwind: fix compilation with musl Package-Manager: Portage-2.3.41, Repoman-2.3.9 ....2.1-only-include-execinfo_h-if-avaliable.patch | 51 ++++++++++++++++++++++ sys-libs/libunwind/libunwind-1.2.1-r1.ebuild | 1 + 2 files changed, 52 insertions(+) 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 00000000000..ee11149771c --- /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" <anar...@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 <anar...@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 8bdde358d13..a4690fc050e 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() {