diff --git redis-2.2.11/deps/hiredis/Makefile redis-2.2.11/deps/hiredis/Makefile
index b186e75..345a15d 100644
diff --git redis-2.2.11/deps/hiredis/Makefile redis-2.2.11/deps/hiredis/Makefile
index 2a84b9b..9d50572 100644
--- redis-2.2.11/deps/hiredis/Makefile
+++ redis-2.2.11/deps/hiredis/Makefile
@@ -26,6 +26,15 @@ ifeq ($(uname_S),Darwin)
   STLIBNAME?=libhiredis.a
   STLIB_MAKE_CMD?=libtool -static -o ${STLIBNAME} - ${OBJ}
 else
+ifeq ($(uname_S),Haiku)
+  CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
+  CCLINK?=-lroot -lnetwork
+  LDFLAGS?=-L. -Wl,-rpath,.
+  DYLIBNAME?=libhiredis.so
+  DYLIB_MAKE_CMD?=gcc -shared -Wl,-soname,${DYLIBNAME} -o ${DYLIBNAME} ${OBJ}
+  STLIBNAME?=libhiredis.a
+  STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
+else
   CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
   CCLINK?=-lm -pthread
   LDFLAGS?=-L. -Wl,-rpath,.
diff --git redis-2.2.11/src/Makefile redis-2.2.11/src/Makefile
index 292255c..51d2910 100644
--- redis-2.2.11/src/Makefile
+++ redis-2.2.11/src/Makefile
@@ -15,7 +15,12 @@ endif
 ifeq ($(uname_S),SunOS)
   CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W -D__EXTENSIONS__ -D_XPG6
   CCLINK?=-ldl -lnsl -lsocket -lm -lpthread
-  DEBUG?=-g -ggdb 
+  DEBUG?=-g -ggdb
+else
+ifeq ($(uname_S),Haiku)
+  CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
+  CCLINK?=-lroot -lnetwork
+  DEBUG?=-g -ggdb
 else
   CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
   CCLINK?=-lm -pthread
--

diff --git redis-2.2.11/src/aof.c redis-2.2.11/src/aof.c
index e30c77f..2403e83 100644
--- redis-2.2.11/src/aof.c
+++ redis-2.2.11/src/aof.c
@@ -23,7 +23,7 @@ void stopAppendOnly(void) {
         int statloc;
 
         if (kill(server.bgsavechildpid,SIGKILL) != -1)
-            wait3(&statloc,0,NULL);
+            waitpid(&statloc,0,NULL);
         /* reset the buffer accumulating changes while the child saves */
         sdsfree(server.bgrewritebuf);
         server.bgrewritebuf = sdsempty();
diff --git redis-2.2.11/src/redis.c redis-2.2.11/src/redis.c
index 45be893..b7d1b0b 100644
--- redis-2.2.11/src/redis.c
+++ redis-2.2.11/src/redis.c
@@ -589,7 +589,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
         int statloc;
         pid_t pid;
 
-        if ((pid = wait3(&statloc,WNOHANG,NULL)) != 0) {
+        if ((pid = waitpid(&statloc,WNOHANG,NULL)) != 0) {
             if (pid == server.bgsavechildpid) {
                 backgroundSaveDoneHandler(statloc);
             } else {
diff --git redis-2.2.11/src/sha1.c redis-2.2.11/src/sha1.c
index 2c50433..312c777 100644
--- redis-2.2.11/src/sha1.c
+++ redis-2.2.11/src/sha1.c
@@ -27,6 +27,9 @@ A million repetitions of "a"
 #if defined(__sun)
 #include "solarisfixes.h"
 #endif
+#ifdef __HAIKU__
+#include <stdint.h>
+#endif
 #include "sha1.h"
 
 #ifndef BYTE_ORDER
