aboutsummaryrefslogtreecommitdiffstats
path: root/community/openvas-scanner/002-execinfo-musl-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/openvas-scanner/002-execinfo-musl-fix.patch')
-rw-r--r--community/openvas-scanner/002-execinfo-musl-fix.patch24
1 files changed, 11 insertions, 13 deletions
diff --git a/community/openvas-scanner/002-execinfo-musl-fix.patch b/community/openvas-scanner/002-execinfo-musl-fix.patch
index 8fd2164221..e52522a633 100644
--- a/community/openvas-scanner/002-execinfo-musl-fix.patch
+++ b/community/openvas-scanner/002-execinfo-musl-fix.patch
@@ -1,19 +1,18 @@
diff --git a/src/sighand.c b/src/sighand.c
-index 1ebf206..985e470 100644
+index 5b6ba2a..04a1ade 100644
--- a/src/sighand.c
+++ b/src/sighand.c
-@@ -30,7 +30,10 @@
+@@ -30,7 +30,9 @@
#include <errno.h> /* for errno() */
#include <sys/wait.h> /* for wait() */
#include <sys/socket.h> /* for shutdown() */
-+
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
#include "log.h"
#include "sighand.h"
-@@ -112,6 +115,7 @@ sighand_chld (pid_t pid)
+@@ -113,6 +115,7 @@ sighand_chld (pid_t pid)
waitpid (pid, &status, WNOHANG);
}
@@ -21,20 +20,19 @@ index 1ebf206..985e470 100644
static void
print_trace ()
{
-@@ -126,13 +130,16 @@ print_trace ()
- log_write ("%s\n", symbols[i]);
- g_free (symbols);
+@@ -140,12 +143,15 @@ print_trace ()
+ ret = backtrace (array, 10);
+ backtrace_symbols_fd (array, ret, fd);
}
+#endif
void
- sighand_segv ()
+ sighand_segv (int given_signal)
{
signal (SIGSEGV, _exit);
- log_write ("SIGSEGV occured !");
-+ #ifdef HAVE_EXECINFO_H
++#ifdef HAVE_EXECINFO_H
print_trace ();
-+ #endif
++#endif
make_em_die (SIGTERM);
- log_close ();
- _exit (0);
+ /* Raise signal again, to exit with the correct return value,
+ * and to enable core dumping. */