Skip to content

Commit

Permalink
Fix socket-flag/TCP_NODELAY on Mac OS X
Browse files Browse the repository at this point in the history
Hi All,

OpenVPN 2.3.4 will currently throw a warning of "NOTE: setsockopt
TCP_NODELAY=1 failed (No kernel support) when attempting to use the
TCP_NODELAY socket option on Mac OS X/Darwin. Kernel support is there,
however the required header file where TCP_NODELAY is defined is not being
included. This patch simply alters syshead.h to include <netinet/tcp.h> on
Darwin platforms.

Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <A1005665-126D-45D5-A6F2-75ED0EAE30FE@sparklabs.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8809

Signed-off-by: Gert Doering <gert@greenie.muc.de>
  • Loading branch information
jbekkema authored and cron2 committed Jun 30, 2014
1 parent b443772 commit 3717076
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/openvpn/syshead.h
Expand Up @@ -349,6 +349,14 @@

#endif /* TARGET_DRAGONFLY */

#ifdef TARGET_DARWIN

#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif

#endif /* TARGET_DARWIN */

#ifdef WIN32
#include <iphlpapi.h>
#include <ntddndis.h>
Expand Down

0 comments on commit 3717076

Please sign in to comment.