void-packages/srcpkgs/cegui/patches/musl_execinfo.patch
2015-08-06 20:32:46 +02:00

22 lines
1 KiB
Diff

In musl libc there is no execinfo.h and no backtrace()
--- cegui/src/Exceptions.cpp 2014-07-07 09:06:18.000000000 +0200
+++ cegui/src/Exceptions.cpp 2015-08-02 17:29:59.057854926 +0200
@@ -37,7 +37,7 @@
#if defined(_MSC_VER)
#include <dbghelp.h>
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
+#elif (defined(__linux__) && defined(__GLIBC__)) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
#include <execinfo.h>
#include <dlfcn.h>
#include <cxxabi.h>
@@ -129,7 +129,7 @@
logger.logEvent("========== End of Backtrace ==========", Errors);
SymCleanup(GetCurrentProcess());
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
+#elif (defined(__linux__) && defined(__GLIBC__)) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
void* buffer[frames];
const int received = backtrace(&buffer[0], frames);