From 69b26542de22a0eca05d3b9863d196f3edd7949c Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 8 Sep 2016 16:09:22 -0700 Subject: [PATCH] Provide static inlines for in6addr things. mdnsresponder needs these and is built against a very old API level since it is used in gmscore. The legacy NDK headers defined these inline. Test: make checkbuild Bug: http://b/30465923 Change-Id: I92cd0116b3bde47e748ba648eaba94a7a3e3523e --- libc/include/netinet/in.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/include/netinet/in.h b/libc/include/netinet/in.h index 00b5cf978..3574976b0 100644 --- a/libc/include/netinet/in.h +++ b/libc/include/netinet/in.h @@ -47,8 +47,13 @@ typedef uint32_t in_addr_t; int bindresvport(int, struct sockaddr_in*); +#if __ANDROID_API__ >= 24 extern const struct in6_addr in6addr_any __INTRODUCED_IN(24); extern const struct in6_addr in6addr_loopback __INTRODUCED_IN(24); +#else +static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; +static const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; +#endif /* __ANDROID_API__ >= 24 */ __END_DECLS -- 2.11.0