summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2014-07-14 22:33:46 +0100
committerMatt Stancliff <matt@genges.com>2015-01-05 16:39:30 -0500
commit85c6bfb02a2dacb9ccd0885f8c1cf807447ae1eb (patch)
tree6db63285a662ab622351d74aaa74f1d1566cb25d
parent9b83ddc2d99ffc2b650e7efc9e0ed82ecb37fdf3 (diff)
Fix build under kfreebsd
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk> [Instead of checking for "not solaris" we feature detect for availability of what we want, then remove the system that advertises compatability but doesn't actually provide it (given our assumptions about what we're guarding).] Closes #254
-rw-r--r--net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net.c b/net.c
index 0bea81e..0059066 100644
--- a/net.c
+++ b/net.c
@@ -138,7 +138,7 @@ int redisKeepAlive(redisContext *c, int interval) {
return REDIS_ERR;
}
#else
-#ifndef __sun
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__)
val = interval;
if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
__redisSetError(c,REDIS_ERR_OTHER,strerror(errno));