diff options
author | David 'Digit' Turner <digit@google.com> | 2010-12-16 14:35:53 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2010-12-16 20:53:03 +0100 |
commit | d4a65d28d4dd7dab4ad66d2d65903296d183d47c (patch) | |
tree | 9155789bade8e2bc53b6d87ea14741a29d0178f4 | |
parent | 95d751feacdb58d3fbc36f3f21a895a3ec2f065b (diff) | |
download | bionic-d4a65d28d4dd7dab4ad66d2d65903296d183d47c.zip bionic-d4a65d28d4dd7dab4ad66d2d65903296d183d47c.tar.gz bionic-d4a65d28d4dd7dab4ad66d2d65903296d183d47c.tar.bz2 |
libc: Add missing declarations in <netinet/in.h>
Add missing declarations:
INET_ADDRSTRLEN
IN6_IS_ADDR_MC_NODELOCAL
IN6_IS_ADDR_MC_GLOBAL
It has been reported that these prevent compilation of the Boost libraries
with the NDK. The corresponding patch has already been performed under
development/ndk/platforms/android-3/include.
Change-Id: I4ac514973daf3c06a8ef5538d7df79142a98e562
-rw-r--r-- | libc/include/netinet/in.h | 2 | ||||
-rw-r--r-- | libc/include/netinet/in6.h | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libc/include/netinet/in.h b/libc/include/netinet/in.h index 0ebd926..7a4b6c7 100644 --- a/libc/include/netinet/in.h +++ b/libc/include/netinet/in.h @@ -38,6 +38,8 @@ __BEGIN_DECLS #define IPPORT_RESERVED 1024 +#define INET_ADDRSTRLEN 16 + extern int bindresvport (int sd, struct sockaddr_in *sin); static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; diff --git a/libc/include/netinet/in6.h b/libc/include/netinet/in6.h index 2f5fee1..c7a6374 100644 --- a/libc/include/netinet/in6.h +++ b/libc/include/netinet/in6.h @@ -74,6 +74,9 @@ #define IPV6_ADDR_MC_SCOPE(a) \ ((a)->s6_addr[1] & 0x0f) +#define IN6_IS_ADDR_MC_NODELOCAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) && \ + (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL)) #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) && \ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL)) @@ -83,7 +86,9 @@ #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) && \ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL)) - +#define IN6_IS_ADDR_MC_GLOBAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) && \ + (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL)) #define IN6_ARE_ADDR_EQUAL(a, b) \ (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) |