Lachim / redis

Automatically exported from code.google.com/p/redis
2 stars 0 forks source link

Compilation failure on OpenBSD-current (redis-2.2.5 and above) #540

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Redis building fails on OpenBSD-current with the following error:

redis.c: In function 'setupSignalHandlers':
redis.c:1662: error: 'SA_NODEFER' undeclared (first use in this function)
redis.c:1662: error: (Each undeclared identifier is reported only once
redis.c:1662: error: for each function it appears in.)
redis.c:1662: error: 'SA_ONSTACK' undeclared (first use in this function)
redis.c:1662: error: 'SA_RESETHAND' undeclared (first use in this function)
gmake[1]: *** [redis.o] Error 1
gmake[1]: Leaving directory `/usr/ports/pobj/redis-2.2.5/redis-2.2.5/src'
gmake: *** [all] Error 2
*** Error code 2

This patch fixes the problem for me:

--- src/fmacros.h.orig
+++ src/fmacros.h
@@ -3,7 +3,7 @@

 #define _BSD_SOURCE

-#ifdef __linux__
+#if defined(__linux__) || defined(__OpenBSD__)
 #define _XOPEN_SOURCE 700
 #else
 #define _XOPEN_SOURCE

Original issue reported on code.google.com by dco...@gmail.com on 29 Apr 2011 at 7:53

GoogleCodeExporter commented 8 years ago
fixed it for me as well

Original comment by jbr...@calistolabs.com on 29 Sep 2011 at 5:23

GoogleCodeExporter commented 8 years ago
Thanks, patch applied to all the Redis branches.

Salvatore

Original comment by anti...@gmail.com on 29 Sep 2011 at 8:21