diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-08-30 17:06:17 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-08-30 17:06:17 -0400 |
commit | da19f88659c12f00939945d4d3fbb1a48bac7e7e (patch) | |
tree | ec57a7740e5af43a13e210fb8a1c7527c2a28e24 /include | |
parent | 09b2995bcb663e0a19210311721bf46d49f87212 (diff) | |
download | musl-da19f88659c12f00939945d4d3fbb1a48bac7e7e.tar.gz musl-da19f88659c12f00939945d4d3fbb1a48bac7e7e.tar.xz musl-da19f88659c12f00939945d4d3fbb1a48bac7e7e.zip |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/netinet/tcp.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 <sys/types.h> #include <sys/socket.h> -#include <endian.h> +#endif +#ifdef _GNU_SOURCE +#include <endian.h> struct tcphdr { u_int16_t source; |