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));