void-packages/srcpkgs/widelands/patches/fix-execinfo.patch
2015-06-01 10:48:22 +02:00

30 lines
572 B
Diff

Disable execinfo.h and backtrace() for musl
--- src/backtrace.cc 2015-06-01 10:36:22.655599851 +0200
+++ src/backtrace.cc 2015-06-01 10:35:04.179600083 +0200
@@ -22,15 +22,17 @@
#ifndef _WIN32
#ifndef __APPLE__
#include <cstdlib>
-
+#ifdef __GLIBC__
#include <execinfo.h>
#endif
#endif
+#endif
std::string get_backtrace() {
std::string result("Backtrace:\n");
#ifndef _WIN32
#ifndef __APPLE__
+#ifdef __GLIBC__
#define BACKTRACE_STACKSIZE 24
void * stack[BACKTRACE_STACKSIZE];
@@ -43,5 +45,6 @@
free(list);
#endif
#endif
+#endif
return result;
}