From da19f88659c12f00939945d4d3fbb1a48bac7e7e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 30 Aug 2013 17:06:17 -0400 Subject: only expose struct tcphdr under _GNU_SOURCE the BSD and GNU versions of this structure differ, so exposing it in the default _BSD_SOURCE profile is possibly problematic. both versions could be simultaneously supported with anonymous unions if needed in the future, but for now, just omitting it except under _GNU_SOURCE should be safe. --- include/netinet/tcp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h index b8c79349..8266f21d 100644 --- a/include/netinet/tcp.h +++ b/include/netinet/tcp.h @@ -31,8 +31,10 @@ #define SOL_TCP 6 #include #include -#include +#endif +#ifdef _GNU_SOURCE +#include struct tcphdr { u_int16_t source; -- cgit v1.2.1