mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-22 06:01:26 +02:00
33 lines
987 B
Diff
33 lines
987 B
Diff
Removes the use of backtrace as musl libc does not support it.
|
|
Patch is upstreamed and should not be needed after FreeCAD v0.20.
|
|
--- ./src/App/Application.cpp
|
|
+++ ./src/App/Application.cpp
|
|
@@ -1589,6 +1589,7 @@
|
|
// This function produces a stack backtrace with demangled function & method names.
|
|
void printBacktrace(size_t skip=0)
|
|
{
|
|
+#if BACKTRACE_PRESENT
|
|
void *callstack[128];
|
|
size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);
|
|
size_t nFrames = backtrace(callstack, nMaxFrames);
|
|
@@ -1619,6 +1620,9 @@
|
|
}
|
|
|
|
free(symbols);
|
|
+#else
|
|
+ std:cerr << "FreeCAD has not been compiled with backtrace support and thus some debug information is not available" << std::endl;
|
|
+#endif
|
|
}
|
|
#endif
|
|
|
|
--- ./cMake/ConfigureChecks.cmake
|
|
+++ ./cMake/ConfigureChecks.cmake
|
|
@@ -62,4 +62,6 @@
|
|
SET(HAVE_QT_KEYPAD_DEFINE 1)
|
|
SET(HAVE_QWIDGET_SHOWFULLSCREEN 1)
|
|
|
|
-
|
|
+IF(Backtrace_FOUND)
|
|
+ ADD_COMPILE_DEFINITIONS(BACKTRACE_PRESENT)
|
|
+ENDIF(Backtrace_FOUND)
|