From: James Yonan Date: Sun, 9 May 2010 00:03:42 +0000 (+0000) Subject: Fixed issue on Windows with MSVC compiler, where TCP_NODELAY support X-Git-Tag: v2.2-beta1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8db6234db7dd61e9cef60baf1ace39f5575e8fbb;p=thirdparty%2Fopenvpn.git Fixed issue on Windows with MSVC compiler, where TCP_NODELAY support was not being compiled in. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5620 e7ae566f-a301-0410-adde-c780ea21d3b5 --- diff --git a/socket.c b/socket.c index 40e6c7e56..cf4ddb6ad 100644 --- a/socket.c +++ b/socket.c @@ -486,7 +486,7 @@ socket_set_buffers (int fd, const struct socket_buffer_size *sbs) static bool socket_set_tcp_nodelay (int sd, int state) { -#if defined(HAVE_SETSOCKOPT) && defined(IPPROTO_TCP) && defined(TCP_NODELAY) +#if defined(WIN32) || (defined(HAVE_SETSOCKOPT) && defined(IPPROTO_TCP) && defined(TCP_NODELAY)) if (setsockopt (sd, IPPROTO_TCP, TCP_NODELAY, (void *) &state, sizeof (state)) != 0) { msg (M_WARN, "NOTE: setsockopt TCP_NODELAY=%d failed", state);