From 83712b7f23614dd379b229d28a876fe4afa328eb Mon Sep 17 00:00:00 2001 From: leitner Date: Thu, 7 Apr 2016 12:08:05 +0000 Subject: [PATCH] attempt to support FreeBSD --- socket/socket_fastopen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/socket/socket_fastopen.c b/socket/socket_fastopen.c index 0a9c659..dc1a5f9 100644 --- a/socket/socket_fastopen.c +++ b/socket/socket_fastopen.c @@ -2,10 +2,15 @@ #ifndef __MINGW32__ #include #include +#include #include #endif #include +#if defined(TCP_FASTOPEN) && !defined(SOL_TCP) && defined(IPPROTO_TCP) +#define SOL_TCP IPPROTO_TCP +#endif + int socket_fastopen(int s) { #if defined(SOL_TCP) && defined(TCP_FASTOPEN) return setsockopt(s,SOL_TCP,TCP_FASTOPEN,(int[]){ 5 }, sizeof(int));