$OpenBSD: patch-src_redis_c,v 1.5 2012/01/19 08:25:53 dcoppa Exp $
--- src/redis.c.orig	Wed Jan 11 20:30:55 2012
+++ src/redis.c	Thu Jan 19 09:17:27 2012
@@ -33,7 +33,9 @@
 
 #ifdef HAVE_BACKTRACE
 #include <execinfo.h>
+  #ifndef __OpenBSD__
 #include <ucontext.h>
+  #endif
 #endif /* HAVE_BACKTRACE */
 
 #include <time.h>
@@ -43,6 +45,7 @@
 #include <assert.h>
 #include <ctype.h>
 #include <stdarg.h>
+#include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -1723,7 +1726,9 @@ int main(int argc, char **argv) {
 
 #ifdef HAVE_BACKTRACE
 static void *getMcontextEip(ucontext_t *uc) {
-#if defined(__FreeBSD__)
+#if defined(__OpenBSD__)
+    return NULL;
+#elif defined(__FreeBSD__)
     return (void*) uc->uc_mcontext.mc_eip;
 #elif defined(__dietlibc__)
     return (void*) uc->uc_mcontext.eip;
@@ -1752,14 +1757,6 @@ static void *getMcontextEip(ucontext_t *uc) {
 #endif
 }
 
-void bugReportStart(void) {
-    if (server.bug_report_start == 0) {
-        redisLog(REDIS_WARNING,
-            "=== REDIS BUG REPORT START: Cut & paste starting from here ===");
-        server.bug_report_start = 1;
-    }
-}
-
 static void sigsegvHandler(int sig, siginfo_t *info, void *secret) {
     void *trace[100];
     char **messages = NULL;
@@ -1816,6 +1813,14 @@ static void sigsegvHandler(int sig, siginfo_t *info, v
     kill(getpid(),sig);
 }
 #endif /* HAVE_BACKTRACE */
+
+void bugReportStart(void) {
+    if (server.bug_report_start == 0) {
+        redisLog(REDIS_WARNING,
+            "=== REDIS BUG REPORT START: Cut & paste starting from here ===");
+        server.bug_report_start = 1;
+    }
+}
 
 static void sigtermHandler(int sig) {
     REDIS_NOTUSED(sig);
