diff options
author | Nils <nils@nilsand.re> | 2024-07-23 03:13:05 +0100 |
---|---|---|
committer | Bernd Schubert <bernd.schubert@fastmail.fm> | 2024-07-29 08:55:44 +0200 |
commit | febea554d3089667fd12e287cdd7e61b7388cd7c (patch) | |
tree | e7c61a73432e115fb877df21ee56caf8e6ab4d9b /lib | |
parent | 37bc4eb03c39f6832303defdf460eb90f6bbb9bd (diff) | |
download | libfuse-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.c | 5 |
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 }; |