]> 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:49:38 +0000 (16:49 +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>
src/openvpn/syshead.h

index 4050d548d0954c1506a9afc0de298d15d97951d0..22ea5a012e60ef90b83a3510f46c39cc12116fef 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>