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
This commit is contained in:
Chris Lamb 2014-07-14 22:33:46 +01:00 committed by Matt Stancliff
parent 9b83ddc2d9
commit 85c6bfb02a

2
net.c
View File

@ -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));