From: Jeremy Harris Date: Sat, 22 Oct 2016 21:40:39 +0000 (+0100) Subject: TFO: Support compilation on systems which define TCP_FASTOPEN but not MSG_FASTOPEN X-Git-Tag: exim-4_88_RC3~3 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/18f1b2f3f8829931ac096942ff2d1ef85ab5f891?ds=inline TFO: Support compilation on systems which define TCP_FASTOPEN but not MSG_FASTOPEN RHEL 7.0 does that, oddly --- diff --git a/src/OS/os.h-Linux b/src/OS/os.h-Linux index 6400e798e..510865c66 100644 --- a/src/OS/os.h-Linux +++ b/src/OS/os.h-Linux @@ -69,5 +69,9 @@ then change the 0 to 1 in the next block. */ # define EXIM_HAVE_OPENAT #endif +#if defined(TCP_FASTOPEN) && !defined(MSG_FASTOPEN) +# define MSG_FASTOPEN 0x20000000 +#endif + /* End */ diff --git a/src/src/ip.c b/src/src/ip.c index b744f5d4c..a8230a149 100644 --- a/src/src/ip.c +++ b/src/src/ip.c @@ -224,7 +224,7 @@ callout_address = string_sprintf("[%s]:%d", address, port); sigalrm_seen = FALSE; if (timeout > 0) alarm(timeout); -#ifdef TCP_FASTOPEN +#if defined(TCP_FASTOPEN) && defined(MSG_FASTOPEN) /* TCP Fast Open, if the system has a cookie from a previous call to this peer, can send data in the SYN packet. The peer can send data before it gets our ACK of its SYN,ACK - the latter is useful for