diff options
author | Lauri Tirkkonen <lotheac@iki.fi> | 2013-12-23 10:31:03 +0200 |
---|---|---|
committer | Dan McDonald <Dan McDonald danmcd@nexenta.com> | 2013-12-26 11:03:14 -0500 |
commit | 6daf81a9e3654619cbf0e11725f71645f78039b2 (patch) | |
tree | e4d48bc8c21c3c2f6e1d4c1e9cc171509ec9cba4 | |
parent | 07b48dbef2d1395c82edeccaf10e42ea7c0b6b36 (diff) | |
download | illumos-joyent-6daf81a9e3654619cbf0e11725f71645f78039b2.tar.gz |
4409 INET_ADDRSTRLEN, INET6_ADDRSTRLEN, in6addr_any not visible with -std=c99 -D_XOPEN_SOURCE=600
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@kebe.com>
-rw-r--r-- | usr/src/uts/common/netinet/in.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/usr/src/uts/common/netinet/in.h b/usr/src/uts/common/netinet/in.h index b819f0dd39..d530b7f36e 100644 --- a/usr/src/uts/common/netinet/in.h +++ b/usr/src/uts/common/netinet/in.h @@ -1174,7 +1174,7 @@ typedef struct { } in_prefix_t; -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) +#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) /* * IPv6 options */ @@ -1194,6 +1194,19 @@ typedef struct { /* argument type: struct ipv6_mreq */ #define IPV6_LEAVE_GROUP 0xa /* leave an IPv6 multicast group */ /* argument type: struct ipv6_mreq */ + +/* + * Other XPG6 constants. + */ +#define INET_ADDRSTRLEN 16 /* max len IPv4 addr in ascii dotted */ + /* decimal notation. */ +#define INET6_ADDRSTRLEN 46 /* max len of IPv6 addr in ascii */ + /* standard colon-hex notation. */ + +#endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ + +#if !defined(_XPG4_2) || defined(__EXTENSIONS__) + /* * IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP are being kept * for backward compatibility. They have the same meaning as IPV6_JOIN_GROUP @@ -1289,10 +1302,6 @@ typedef struct { /* * Miscellaneous IPv6 constants. */ -#define INET_ADDRSTRLEN 16 /* max len IPv4 addr in ascii dotted */ - /* decimal notation. */ -#define INET6_ADDRSTRLEN 46 /* max len of IPv6 addr in ascii */ - /* standard colon-hex notation. */ #define IPV6_PAD1_OPT 0 /* pad byte in IPv6 extension hdrs */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ @@ -1300,7 +1309,7 @@ typedef struct { /* * Extern declarations for pre-defined global const variables */ -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) +#if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) #ifndef _KERNEL #ifdef __STDC__ extern const struct in6_addr in6addr_any; @@ -1310,7 +1319,7 @@ extern struct in6_addr in6addr_any; extern struct in6_addr in6addr_loopback; #endif #endif -#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ +#endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ #ifdef __cplusplus } |