void-packages/srcpkgs/gcc/patches/fix-musl-execinfo.patch

34 lines
874 B
Diff

There is no <execinfo.h> in musl libc
--- libvtv/vtv_rts.cc 2016-09-23 16:17:11.000000000 +0200
+++ libvtc/vtv_rts.cc 2016-09-25 15:08:57.896000000 +0200
@@ -124,7 +124,7 @@
#include <windows.h>
#include <winternl.h>
#include <psapi.h>
-#else
+#elif defined (__GLIBC__)
#include <execinfo.h>
#endif
--- libvtv/vtv_utils.cc 2016-09-23 16:17:11.000000000 +0200
+++ libvtv/vtv_utils.cc 2016-09-25 15:15:35.529000000 +0200
@@ -34,7 +34,7 @@
#include <string.h>
#if defined (__CYGWIN__) || defined (__MINGW32__)
#include <windows.h>
-#else
+#elif defined (__GLIBC__)
#include <execinfo.h>
#endif
@@ -178,7 +178,7 @@
__vtv_add_to_log (vtv_failures_log_fd, "%s", log_msg);
-#if !defined (__CYGWIN__) && !defined (__MINGW32__)
+#if !defined (__CYGWIN__) && !defined (__MINGW32__) && defined(__GLIBC__)
if (generate_backtrace)
{
#define STACK_DEPTH 20