From: Rich Felker Date: Fri, 30 Aug 2013 21:06:17 +0000 (-0400) Subject: only expose struct tcphdr under _GNU_SOURCE X-Git-Tag: v0.9.13~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=da19f88659c12f00939945d4d3fbb1a48bac7e7e;p=oweals%2Fmusl.git 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. --- 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;