Browse code

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

James Yonan authored on 2010/05/09 09:03:42
Showing 1 changed files
... ...
@@ -486,7 +486,7 @@ socket_set_buffers (int fd, const struct socket_buffer_size *sbs)
486 486
 static bool
487 487
 socket_set_tcp_nodelay (int sd, int state)
488 488
 {
489
-#if defined(HAVE_SETSOCKOPT) && defined(IPPROTO_TCP) && defined(TCP_NODELAY)
489
+#if defined(WIN32) || (defined(HAVE_SETSOCKOPT) && defined(IPPROTO_TCP) && defined(TCP_NODELAY))
490 490
   if (setsockopt (sd, IPPROTO_TCP, TCP_NODELAY, (void *) &state, sizeof (state)) != 0)
491 491
     {
492 492
       msg (M_WARN, "NOTE: setsockopt TCP_NODELAY=%d failed", state);