summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wlclock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wlclock.c b/src/wlclock.c
index bbddf35..a5f1b54 100644
--- a/src/wlclock.c
+++ b/src/wlclock.c
@@ -9,8 +9,11 @@
#include<signal.h>
#ifdef __linux__
+#include<features.h>
+#ifdef __GLIBC__
#include<execinfo.h>
#endif
+#endif
#include<wayland-server.h>
#include<wayland-client.h>
@@ -58,6 +61,7 @@ static void handle_error (int signum)
fputs(msg, stderr);
#ifdef __linux__
+#ifdef __GLIBC__
fputs("Attempting to get backtrace:\n", stderr);
/* In some rare cases, getting a backtrace can also cause a segfault.
@@ -69,6 +73,7 @@ static void handle_error (int signum)
backtrace_symbols_fd(buffer, calls, fileno(stderr));
fputs("\n", stderr);
#endif
+#endif
/* Let the default handlers deal with the rest. */
signal(signum, SIG_DFL);