rpc: TCP_KEEPALIVE undeclared in NetBSD

Works around "error: 'TCP_KEEPALIVE' undeclared" on NetBSD

Thanks to: Emmanuel Dreyfus <manu@netbsd.org>

Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2923 (NetBSD port)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2923
This commit is contained in:
Anand Avati 2011-05-20 16:56:26 +00:00
parent 291588c6d9
commit beb2b28ff1

View File

@ -398,7 +398,7 @@ __socket_keepalive (int fd, int keepalive_intvl, int keepalive_idle)
if (keepalive_intvl == GF_USE_DEFAULT_KEEPALIVE)
goto done;
#ifndef GF_LINUX_HOST_OS
#if !defined(GF_LINUX_HOST_OS) && !defined(__NetBSD__)
#ifdef GF_SOLARIS_HOST_OS
ret = setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive_intvl,
sizeof (keepalive_intvl));