summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/replace/test/getifaddrs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/lib/replace/test/getifaddrs.c b/source4/lib/replace/test/getifaddrs.c
index c78c9b545e..8b00ac2f40 100644
--- a/source4/lib/replace/test/getifaddrs.c
+++ b/source4/lib/replace/test/getifaddrs.c
@@ -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;
}