antirez/redis — Issue #155: Problems building on NetBSD
Author: antirez
Created: 2011-10-21 15:55:22+00:00
State: open
Labels: 2.4 merge candidate, critical bug

Just received this:

This is what I'm currently doing to build on NetBSD, review, comments?

-bch

```
$NetBSD$

--- ./src/redis.c.orig 2011-10-17 08:46:00.000000000 +0000
+++ ./src/redis.c
@@ -1739,7 +1739,6 @@ static void sigsegvHandler(int sig, sigi
sigaction (sig, &act, NULL);
kill(getpid(),sig);
}
-#endif /* HAVE_BACKTRACE */

static void sigtermHandler(int sig) {
REDIS_NOTUSED(sig);
@@ -1758,7 +1757,6 @@ void setupSignalHandlers(void) {
act.sa_handler = sigtermHandler;
sigaction(SIGTERM, &act, NULL);

-#ifdef HAVE_BACKTRACE
sigemptyset(&act.sa_mask);
act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
act.sa_sigaction = sigsegvHandler;
@@ -1766,8 +1764,11 @@ void setupSignalHandlers(void) {
sigaction(SIGBUS, &act, NULL);
sigaction(SIGFPE, &act, NULL);
sigaction(SIGILL, &act, NULL);
-#endif
return;
}
+#else /* HAVE_BACKTRACE */
+void setupSignalHandlers(void) {
+}
+#endif /* HAVE_BACKTRACE */

/* The End */
```