Gate #include <execinfo.h> behind #ifdef HAVE_BACKTRACE
authorNils <nils@nilsand.re>
Tue, 23 Jul 2024 02:13:05 +0000 (03:13 +0100)
committerBernd Schubert <bernd.schubert@fastmail.fm>
Mon, 29 Jul 2024 06:55:44 +0000 (08:55 +0200)
execinfo.h is unnecessary if HAVE_BACKTRACE is not defined.
This increases portability for systems without execinfo.h

lib/fuse_signals.c

index 0380c8255b082433e74e6a51eecb3191e3ba53bd..99af700aa1a7f50a089774044b98164a66135385 100644 (file)
 #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 };