void-packages/srcpkgs/scribus/patches/no-execinfo.patch

34 lines
1010 B
Diff

dirty hack to remove execinfo
diff --git a/scribus/util.cpp b/scribus/util.cpp
--- a/scribus/util.cpp
+++ b/scribus/util.cpp
@@ -43,7 +43,7 @@
#include <csignal>
-#if !defined(_WIN32) && !defined(Q_OS_MACOS)
+#if !defined(_WIN32) && !defined(Q_OS_MACOS) && defined(__GLIBC__)
#include <execinfo.h>
#include <cxxabi.h>
#endif
--- a/scribus/util_debug.cpp
+++ b/scribus/util_debug.cpp
@@ -24,7 +24,7 @@
#include <QDateTime>
#include <QtGlobal>
-#if !defined(_WIN32) && !defined(Q_OS_MACOS)
+#if !defined(_WIN32) && !defined(Q_OS_MACOS) && defined(__GLIBC__)
#include <execinfo.h>
#include <cxxabi.h>
#endif
@@ -53,7 +53,7 @@
*/
void printBacktrace ( int nFrames )
{
-#if !defined(_WIN32) && !defined(Q_OS_MACOS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD)
+#if !defined(_WIN32) && !defined(Q_OS_MACOS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD) && defined(__GLIBC__)
void ** trace = new void*[nFrames + 1];
char **messages = ( char ** ) nullptr;
int i, trace_size = 0;