X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/89b3af67bb32e691275bf6fa803d1834b2284115..b0d623f7f2ae71ed96e60569f61f9a9a27016e80:/bsd/netinet/tcp.h?ds=sidebyside diff --git a/bsd/netinet/tcp.h b/bsd/netinet/tcp.h index 4a2460b16..3b4d8f92f 100644 --- a/bsd/netinet/tcp.h +++ b/bsd/netinet/tcp.h @@ -67,7 +67,7 @@ #include #include -#ifndef _POSIX_C_SOURCE +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) typedef __uint32_t tcp_seq; typedef __uint32_t tcp_cc; /* connection count per rfc1644 */ @@ -114,7 +114,7 @@ struct tcphdr { #define TCPOPT_WINDOW 3 #define TCPOLEN_WINDOW 3 #define TCPOPT_SACK_PERMITTED 4 /* Experimental */ -#define TCPOLEN_SACK_PERMITTED 2 +#define TCPOLEN_SACK_PERMITTED 2 #define TCPOPT_SACK 5 /* Experimental */ #define TCPOLEN_SACK 8 /* len of sack block */ #define TCPOPT_TIMESTAMP 8 @@ -190,17 +190,18 @@ struct tcphdr { #define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */ #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr)) /* max space left for options */ -#endif /* _POSIX_C_SOURCE */ +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ /* * User-settable options (used with setsockopt). */ -#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ -#ifndef _POSIX_C_SOURCE -#define TCP_MAXSEG 0x02 /* set maximum segment size */ -#define TCP_NOPUSH 0x04 /* don't push last block of write */ -#define TCP_NOOPT 0x08 /* don't use TCP options */ -#define TCP_KEEPALIVE 0x10 /* idle time used when SO_KEEPALIVE is enabled */ -#endif /* _POSIX_C_SOURCE */ +#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ +#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) +#define TCP_MAXSEG 0x02 /* set maximum segment size */ +#define TCP_NOPUSH 0x04 /* don't push last block of write */ +#define TCP_NOOPT 0x08 /* don't use TCP options */ +#define TCP_KEEPALIVE 0x10 /* idle time used when SO_KEEPALIVE is enabled */ +#define TCP_CONNECTIONTIMEOUT 0x20 /* connection timeout */ +#endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ #endif