From 9fa4711e364e9aa779d6b8d12220bbb63dbb1f3d Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Feb 2011 18:45:19 +0100 Subject: guard IPv6 stuff disable IPv6 related stuff if feature is disabled. Signed-off-by: Peter S. Mazinger --- libc/inet/getaddrinfo.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libc/inet/getaddrinfo.c') diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index cdfdb72cf..b3435a8b2 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -639,9 +639,13 @@ gaih_inet(const char *name, const struct gaih_service *service, tmpbuflen *= 2; tmpbuf = alloca(tmpbuflen); rc = gethostbyaddr_r(at2->addr, +#ifdef __UCLIBC_HAS_IPV6__ ((at2->family == AF_INET6) ? sizeof(struct in6_addr) : sizeof(struct in_addr)), +#else + sizeof(struct in_addr), +#endif at2->family, &th, tmpbuf, tmpbuflen, &h, &herrno); -- cgit v1.2.3