diff --git a/src/sighand.c b/src/sighand.c index 8752ae1..b30682c 100644 --- a/src/sighand.c +++ b/src/sighand.c @@ -27,8 +27,9 @@ #include "debug_utils.h" #include "processes.h" - +#ifdef HAVE_EXECINFO_H #include /* for backtrace() */ +#endif #include /* for G_LOG_DOMAIN, for g_critical() */ #include /* for kill() */ #include /* for waitpid() */ @@ -113,6 +114,7 @@ sighand_chld (int sig) waitpid (-1, NULL, WNOHANG); } +#ifdef HAVE_EXECINFO_H static void print_trace (void) { @@ -131,11 +133,14 @@ print_trace (void) g_free (strings); } +#endif void sighand_segv (int given_signal) { +#ifdef HAVE_EXECINFO_H print_trace (); +#endif make_em_die (SIGTERM); gvm_close_sentry (); /* Raise signal again, to exit with the correct return value,