1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--- a/src/main.c
+++ b/src/main.c
@@ -26,7 +26,9 @@
#include <syslog.h>
#include <errno.h>
#include <unistd.h>
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
#include "config.h"
#include "objects.h"
@@ -85,6 +87,7 @@
exit(EXIT_SUCCESS);
}
+#ifdef HAVE_EXECINFO_H
static void nftlb_trace() {
void *buffer[255];
char **str;
@@ -106,6 +109,7 @@
exit(EXIT_FAILURE);
}
+#endif
int main(int argc, char *argv[])
{
@@ -157,8 +161,7 @@
if (signal(SIGINT, nftlb_sighandler) == SIG_ERR ||
signal(SIGTERM, nftlb_sighandler) == SIG_ERR ||
- signal(SIGPIPE, SIG_IGN) == SIG_ERR ||
- signal(SIGSEGV, nftlb_trace) == SIG_ERR) {
+ signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
fprintf(stderr, "Error assigning signals\n");
syslog(LOG_ERR, "Error assigning signals");
return EXIT_FAILURE;
|