Am 12.01.2013 21:13, schrieb Gert Doering:
> Hi,
> 
> On Sat, Jan 12, 2013 at 01:41:17PM +0100, Matthias Andree wrote:
>> The missing #include <netinet/tcp.h> causes a defined(TCP_NODELAY) to
>> fail.  I have added the patch to the FreeBSD ports OpenVPN 2.2.2 and
>> 2.3.0, and confirmed (with strings ... | grep) that the TCP_NODELAY code
>> is now part of the executable on amd64, and results in this log output:
>>
>> Sat Jan 12 13:39:18 2013 Listening for incoming TCP connection on [undef]
>> Sat Jan 12 13:39:18 2013 Socket flags: TCP_NODELAY=1 succeeded
>>
>> Obtained from: https://community.openvpn.net/openvpn/ticket/158
>> Credits to: M. Nottebrock
>>
>> Signed-off-by: Matthias Andree <matthias.and...@gmx.de>
> 
> ACK, "obviously logical" - needs a build test across all other platforms
> to check whether some obscure OS (like "Linux" or "Solaris" or "MinGW")
> chokes if that header is included now, but I don't expect issues.

No need for non-FreeBSD build tests, this is the wider context
- M. Nottebrock who added the patch to Trac had added the #include in
the "#ifdef TARGET_FREEBSD" section so it is invisible to other systems.

Other BSDs already include this header, I presume it was an oversight to
omit this from FreeBSD builds, once upon a time.

 #ifdef TARGET_FREEBSD

 #ifdef HAVE_SYS_UIO_H
 #include <sys/uio.h>
 #endif

 #ifdef HAVE_NETINET_IN_SYSTM_H
 #include <netinet/in_systm.h>
 #endif

 #ifdef HAVE_NETINET_IP_H
 #include <netinet/ip.h>
 #endif

+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
 #ifdef HAVE_NET_IF_TUN_H
 #include <net/if_tun.h>
 #endif

 #endif /* TARGET_FREEBSD */

> 2.3.1 and master, I'd say :-)

And 2.2.3 if that branch is still maintained.



Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to