void-packages/srcpkgs/qbittorrent/patches/musl-execinfo.patch
2016-04-12 10:48:03 +02:00

23 lines
641 B
Diff

--- src/app/main.cpp 2016-03-29 22:24:47.000000000 +0200
+++ src/app/main.cpp 2016-04-12 10:42:35.621054446 +0200
@@ -59,8 +59,10 @@
#ifdef Q_OS_UNIX
#include <signal.h>
+#if defined(__GLIBC__)
#include <execinfo.h>
#include "stacktrace.h"
+#endif
#endif // Q_OS_UNIX
#ifdef STACKTRACE_WIN
@@ -347,7 +349,9 @@
write(STDERR_FILENO, str1, strlen(str1));
write(STDERR_FILENO, sigName, strlen(sigName));
write(STDERR_FILENO, str2, strlen(str2));
+#if defined(__GLIBC__)
print_stacktrace(); // unsafe
+#endif
#endif // !defined Q_OS_WIN && !defined Q_OS_HAIKU
#ifdef STACKTRACE_WIN
StraceDlg dlg; // unsafe