void-packages/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
Piraty e91be7be35
freecad: fix musl build (patch usage of execinfo)
Closes: #13615 [via git-merge-pr]
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2018-04-22 14:56:46 +02:00

30 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