libreplace: ifdef out ip6 code if unsupported.
authorMichael Adam <obnox@samba.org>
Fri, 29 Feb 2008 01:43:24 +0000 (02:43 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 29 Feb 2008 08:32:05 +0000 (09:32 +0100)
Michael
(cherry picked from commit 54cc0df4dbf6d63a9b94e1ac6af4ec7f7803bc30)
(This used to be commit 1ff0b616a9cb029040031f797b52112d4973e1eb)

source3/lib/replace/test/getifaddrs.c

index c78c9b545e2281f704a255e524139a2299ec7645..8b00ac2f40c5f20c5ad95cdf982f441670eaf021 100644 (file)
@@ -39,11 +39,13 @@ static const char *format_sockaddr(struct sockaddr *addr,
                                       &((struct sockaddr_in *)addr)->sin_addr,
                                       addrstring,
                                       addrlen);
+#ifdef HAVE_STRUCT_SOCKADDR_IN6
        } else if (addr->sa_family == AF_INET6) {
                result = rep_inet_ntop(AF_INET6,
                                       &((struct sockaddr_in6 *)addr)->sin6_addr,
                                       addrstring,
                                       addrlen);
+#endif
        }
        return result;
 }