aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNils <nils@nilsand.re>2024-07-23 03:13:05 +0100
committerBernd Schubert <bernd.schubert@fastmail.fm>2024-07-29 08:55:44 +0200
commitfebea554d3089667fd12e287cdd7e61b7388cd7c (patch)
treee7c61a73432e115fb877df21ee56caf8e6ab4d9b /lib
parent37bc4eb03c39f6832303defdf460eb90f6bbb9bd (diff)
downloadlibfuse-febea554d3089667fd12e287cdd7e61b7388cd7c.tar.gz
Gate #include <execinfo.h> behind #ifdef HAVE_BACKTRACE
execinfo.h is unnecessary if HAVE_BACKTRACE is not defined. This increases portability for systems without execinfo.h
Diffstat (limited to 'lib')
-rw-r--r--lib/fuse_signals.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fuse_signals.c b/lib/fuse_signals.c
index 0380c82..99af700 100644
--- a/lib/fuse_signals.c
+++ b/lib/fuse_signals.c
@@ -16,9 +16,12 @@
#include <string.h>
#include <signal.h>
#include <stdlib.h>
-#include <execinfo.h>
#include <errno.h>
+#ifdef HAVE_BACKTRACE
+#include <execinfo.h>
+#endif
+
static int teardown_sigs[] = { SIGHUP, SIGINT, SIGTERM };
static int ignore_sigs[] = { SIGPIPE};
static int fail_sigs[] = { SIGILL, SIGTRAP, SIGABRT, SIGBUS, SIGFPE, SIGSEGV };