30 lines
730 B
Diff
30 lines
730 B
Diff
|
--- daemon/sigsegv.c.orig 2016-06-06 16:11:21.506119807 +0200
|
||
|
+++ 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
|