always export iscsi_set_tcp_keepalive()

Set only the (socket) options which are defined on a given platform.
The function becomes a no-op if no option is known at complie time.
Remove autoconf test for HAVE_TCP_KEEPALIVE too.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Michael Tokarev
2012-05-12 01:20:01 +04:00
committed by Ronnie Sahlberg
parent c91de1e35a
commit aee0e3bf72
3 changed files with 10 additions and 19 deletions

View File

@@ -38,16 +38,6 @@ if test x"$libiscsi_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property])
fi
AC_CACHE_CHECK([for tcp keepalive],libiscsi_cv_HAVE_TCP_KEEPALIVE,[
AC_TRY_COMPILE([#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>],
[int foo = TCP_KEEPCNT + TCP_KEEPIDLE + TCP_KEEPINTVL],
libiscsi_cv_HAVE_TCP_KEEPALIVE=yes,libiscsi_cv_HAVE_TCP_KEEPALIVE=no)])
if test x"$libiscsi_cv_HAVE_TCP_KEEPALIVE" = x"yes"; then
AC_DEFINE(HAVE_TCP_KEEPALIVE,1,[Whether we have support for tcp keepalive socket options])
fi
AC_CACHE_CHECK([for sys filio.h],libiscsi_cv_NEED_SYS_FILIO_H,[
AC_TRY_COMPILE([#include <stdint.h>
#include <sys/filio.h>],