void-packages/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch

31 lines
588 B
Diff

--- src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
+++ src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp
@@ -29,7 +29,9 @@
#ifndef WIN32
#include <unistd.h>
#include <sys/stat.h>
+#ifdef __GLIBC__
#include <execinfo.h>
+#endif
#endif
@@ -109,6 +111,7 @@
#ifndef WIN32
void print_traceback()
{
+#ifdef __GLIBC__
void *array[50];
size_t size;
char **strings;
@@ -123,6 +126,9 @@
}
free (strings);
+#else
+ std::cerr << "sorry, no backtrace on musl libc";
+#endif
}
#else
#if (_MSC_VER >= 1400) // Visual Studio 2005