Permalink
Browse files

OSX 10.11 supports TCP_FASTOPEN

But does not define SOL_TCP.
IPPROTO_TCP is the equivalent.
  • Loading branch information...
rrva committed Jul 14, 2015
1 parent 03b86d8 commit b608eb1772641d525bfde268fe9d6d8d0d5efde7
Showing with 5 additions and 0 deletions.
  1. +5 −0 core/socket.c
View
@@ -712,6 +712,11 @@ int bind_to_tcp(char *socket_name, int listen_queue, char *tcp_port) {
if (uwsgi.tcp_fast_open) {
#ifdef TCP_FASTOPEN
#ifndef SOL_TCP
#define SOL_TCP IPPROTO_TCP
#endif
if (setsockopt(serverfd, SOL_TCP, TCP_FASTOPEN, (const void *) &uwsgi.tcp_fast_open, sizeof(int)) < 0) {
uwsgi_error("TCP_FASTOPEN setsockopt()");
}

0 comments on commit b608eb1

Please sign in to comment.