void-packages/srcpkgs/widelands/patches/fix-execinfo.patch

29 lines
544 B
Diff

--- src/logic/backtrace.cc 2016-11-10 08:28:01.000000000 +0100
+++ src/logic/backtrace.cc 2017-12-19 07:58:01.659673467 +0100
@@ -22,15 +22,17 @@
#ifndef _WIN32
#ifndef __APPLE__
#include <cstdlib>
-
+#if defined(__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;
}