summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--async.c3
-rw-r--r--fmacros.h2
-rw-r--r--net.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/async.c b/async.c
index a993ff1..0670aa7 100644
--- a/async.c
+++ b/async.c
@@ -336,7 +336,8 @@ static void __redisAsyncDisconnect(redisAsyncContext *ac) {
if (ac->err == 0) {
/* For clean disconnects, there should be no pending callbacks. */
- assert(__redisShiftCallback(&ac->replies,NULL) == REDIS_ERR);
+ int ret = __redisShiftCallback(&ac->replies,NULL);
+ assert(ret == REDIS_ERR);
} else {
/* Disconnection is caused by an error, make sure that pending
* callbacks cannot call new commands. */
diff --git a/fmacros.h b/fmacros.h
index 14fed60..9a56643 100644
--- a/fmacros.h
+++ b/fmacros.h
@@ -13,7 +13,7 @@
#if defined(__sun__)
#define _POSIX_C_SOURCE 200112L
#else
-#if !(defined(__APPLE__) && defined(__MACH__))
+#if !(defined(__APPLE__) && defined(__MACH__)) && !(defined(__FreeBSD__))
#define _XOPEN_SOURCE 600
#endif
#endif
diff --git a/net.c b/net.c
index 024f645..d332db1 100644
--- a/net.c
+++ b/net.c
@@ -357,6 +357,7 @@ addrretry:
n = 1;
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char*) &n,
sizeof(n)) < 0) {
+ freeaddrinfo(bservinfo);
goto error;
}
}