]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix socket-flag/TCP_NODELAY on Mac OS X
authorJames Bekkema <james@sparklabs.com>
Thu, 26 Jun 2014 11:40:39 +0000 (21:40 +1000)
committerGert Doering <gert@greenie.muc.de>
Mon, 30 Jun 2014 14:50:39 +0000 (16:50 +0200)
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>
(cherry picked from commit 37170767a221a4847416fc339083704ae1b4c001)

src/openvpn/syshead.h

index 7a7d53a803100dfa1c39cd14003a525a36f77327..f957a10e2f6042ea97326798f6288ec4e5e16892 100644 (file)
 
 #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>