aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-12 09:32:58 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-18 12:20:16 +0200
commit025d3bb1f491da2850bb3d44672229ee6c436afe (patch)
treed59376b40dc7597a855e92c9b89825ef560a0217 /sources
parenta6d206f4aa3a583304b88fad80dd341bccb45975 (diff)
libshiboken: Support musl libc
Patch as contributed on JIRA. Change-Id: I07303a3f09259ea5f76ee09505c61d6a45fbe81a Fixes: PYSIDE-1298 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken2/libshiboken/signature.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp
index 533ab8114..ba1fc119e 100644
--- a/sources/shiboken2/libshiboken/signature.cpp
+++ b/sources/shiboken2/libshiboken/signature.cpp
@@ -865,12 +865,15 @@ get_signature(PyObject * /* self */, PyObject *args)
////////////////////////////////////////////////////////////////////////////
// a stack trace for linux-like platforms
#include <stdio.h>
-#include <execinfo.h>
+#if defined(__GLIBC__)
+# include <execinfo.h>
+#endif
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
void handler(int sig) {
+#if defined(__GLIBC__)
void *array[30];
size_t size;
@@ -878,8 +881,11 @@ void handler(int sig) {
size = backtrace(array, 30);
// print out all the frames to stderr
+#endif
fprintf(stderr, "Error: signal %d:\n", sig);
+#if defined(__GLIBC__)
backtrace_symbols_fd(array, size, STDERR_FILENO);
+#endif
exit(1);
}