aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/ladish/patches/musl-no-execinfo.patch
blob: 6711cf125c9e1da09c5e2b72515fee8bef11bc68 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/daemon/sigsegv.c	2016-06-06 16:11:21.506119807 +0200
+++ b/daemon/sigsegv.c	2016-06-06 16:11:26.667120074 +0200
@@ -39,7 +39,9 @@
 #include <signal.h>
 #include <ucontext.h>
 #include <dlfcn.h>
+#if defined(__GLIBC__)
 #include <execinfo.h>
+#endif
 #include <errno.h>
 #ifndef NO_CPP_DEMANGLE
 //#include <cxxabi.h>
@@ -154,13 +156,15 @@
         ip = bp[1];
         bp = (void**)bp[0];
     }
-#else
+#elif defined(__GLIBC__)
     log_error("Stack trace (non-dedicated):");
     sz = backtrace(bt, 20);
     strings = backtrace_symbols(bt, sz);
 
     for(i = 0; i < sz; ++i)
         log_error("%s", strings[i]);
+#else
+    log_error("Stack trace not available");
 #endif
     log_error("End of stack trace");
 #endif