From acde013522fc264f0898d300cc9d2ff796c1a006 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 8 Jan 2014 18:54:33 -0500 Subject: fix remaining known namespace violations for netinet/in.h the imr_, imsf_, ip6_, ip6m_, ipi_, ipi6_, SCM_, and SOL_ prefixes are not in the reserved namespace for this header. thus the constants and structures using them need to be protected under appropriate feature test macros. this also affects some headers which are permitted to include netinet/in.h, particularly netdb.h and arpa/inet.h. the SOL_ macros are moved to sys/socket.h where they are in the reserved namespace (SO*). they are still accessible via netinet/in.h since it includes sys/socket.h implicitly (which is permitted). the SCM_SRCRT macro is simply removed, since the definition used for it, IPV6_RXSRCRT is not defined anywhere. it could be re-added, this time in sys/socket.h, if the appropriate value can be determined; however, given that the erroneous definition was not caught, it is unlikely that any software actually attempts to use SCM_SRCRT. --- include/sys/socket.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sys') diff --git a/include/sys/socket.h b/include/sys/socket.h index 82edd6f7..79a41cc3 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -207,6 +207,10 @@ struct linger #define SOL_SOCKET 1 #endif +#define SOL_IP 0 +#define SOL_IPV6 41 +#define SOL_ICMPV6 58 + #define SOL_RAW 255 #define SOL_DECNET 261 #define SOL_X25 262 -- cgit v1.2.1