1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/qt-creator/fix-execinfo.patch
Alexey Minnekhanov ba1d212d4c testing/qt-creator: upgrade to 4.15.1
* switch to cmake buildsystem
* build with clangbackend support
* build with KF5SyntaxHightlighting
2021-06-25 11:18:53 +00:00

63 lines
1.7 KiB
Diff

--- a/src/plugins/debugger/shared/backtrace.cpp
+++ b/src/plugins/debugger/shared/backtrace.cpp
@@ -30,8 +30,10 @@
#if defined(Q_OS_LINUX)
#include <stdio.h>
#include <signal.h>
+#ifdef __GLIBC__
#include <execinfo.h>
#endif
+#endif
namespace Debugger {
namespace Internal {
@@ -40,7 +42,7 @@ void dumpBacktrace(int maxdepth)
{
if (maxdepth == -1)
maxdepth = 200;
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
void *bt[200] = {nullptr};
qDebug() << "BACKTRACE:";
int size = backtrace(bt, sizeof(bt) / sizeof(bt[0]));
diff --git a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
index a3a9806f7e..c369e681ab 100644
--- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
@@ -26,7 +26,9 @@
#include "exception.h"
#ifdef Q_OS_LINUX
+#if defined(__GLIBC__)
#include <execinfo.h>
+#endif
#include <cxxabi.h>
#endif
@@ -100,6 +102,7 @@ bool Exception::warnAboutException()
}
#ifdef Q_OS_LINUX
+#ifdef __GLIBC__
static QString getBackTrace()
{
QString backTrace;
@@ -115,6 +118,7 @@ static QString getBackTrace()
return backTrace;
}
#endif
+#endif
QString Exception::defaultDescription(int line, const QByteArray &function, const QByteArray &file)
{
@@ -138,8 +142,10 @@ Exception::Exception(int line, const QByteArray &function,
, m_file(QString::fromUtf8(file))
, m_description(description)
#ifdef Q_OS_LINUX
+ #ifdef __GLIBC__
, m_backTrace(getBackTrace())
#endif
+ #endif
{
if (s_shouldAssert) {
qDebug() << Exception::description();