aboutsummaryrefslogtreecommitdiffstats
path: root/testing/widelands/fix-execinfo.patch
blob: 4b4b35d44f61e4c827dd4f5a0c2d51606caae81b (plain)
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
--- a/src/logic/backtrace.cc	2016-11-10 08:28:01.000000000 +0100
+++ b/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;
 }