summaryrefslogtreecommitdiff
blob: b36cfef2d4e76775cd6c0440466ba73776e282ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
execinfo is unavailable with musl (unless opted to package+use libexecinfo)
--- a/src/libs/utils/qtcassert.cpp
+++ b/src/libs/utils/qtcassert.cpp
@@ -9,5 +9,5 @@
 #include <QTime>
 
-#if defined(Q_OS_UNIX)
+#if defined(Q_OS_UNIX) && defined(__GLIBC__)
 #include <stdio.h>
 #include <signal.h>
@@ -30,5 +30,5 @@
     if (maxdepth < 0 || maxdepth > ArraySize)
         maxdepth = ArraySize;
-#if defined(Q_OS_UNIX)
+#if defined(Q_OS_UNIX) && defined(__GLIBC__)
     void *bt[ArraySize] = {nullptr};
     int size = backtrace(bt, maxdepth);
--- a/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
+++ b/src/plugins/qmldesigner/designercore/exceptions/exception.cpp
@@ -4,5 +4,5 @@
 #include "exception.h"
 
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
 #include <execinfo.h>
 #include <cxxabi.h>
@@ -31,5 +31,5 @@
 namespace QmlDesigner {
 
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
 const char* demangle(const char* name)
 {
@@ -76,5 +76,5 @@
 }
 
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) && defined(__GLIBC__)
 static QString getBackTrace()
 {
@@ -114,5 +114,5 @@
   , m_file(QString::fromUtf8(file))
   , m_description(description)
-  #ifdef Q_OS_LINUX
+  #if defined(Q_OS_LINUX) && defined(__GLIBC__)
   , m_backTrace(getBackTrace())
   #endif