aboutsummaryrefslogblamecommitdiffstats
path: root/community/openvas-scanner/execinfo-musl-fix.patch
blob: fb37acded74b0cace4674c0ccb6f8b9bc22cfe6e (plain) (tree)






































                                                                
diff --git a/src/sighand.c b/src/sighand.c
index ef698ee..c1deb6a 100644
--- a/src/sighand.c
+++ b/src/sighand.c
@@ -29,7 +29,10 @@
 #include "utils.h"
 
 #include <errno.h> /* for errno() */
+#ifdef HAVE_EXECINFO_H
 #include <execinfo.h>
+#endif
+
 #include <glib.h> /* for G_LOG_DOMAIN, for g_critical() */
 #include <gvm/base/pidfile.h>
 #include <signal.h>     /* for kill() */
@@ -115,6 +118,7 @@ sighand_chld (pid_t pid)
   waitpid (pid, &status, WNOHANG);
 }
 
+#ifdef HAVE_EXECINFO_H
 static void
 print_trace ()
 {
@@ -133,12 +137,15 @@ print_trace ()
 
   g_free (strings);
 }
+#endif
 
 void
 sighand_segv (int given_signal)
 {
   signal (SIGSEGV, _exit);
+#ifdef HAVE_EXECINFO_H
   print_trace ();
+#endif
   make_em_die (SIGTERM);
   /* Raise signal again, to exit with the correct return value,
    * and to enable core dumping. */