$NetBSD: patch-ac,v 1.5 2007/03/10 00:59:28 rillig Exp $ --- mDNSPosix/mDNSUNP.c.orig 2006-02-20 22:40:36.000000000 +0100 +++ mDNSPosix/mDNSUNP.c 2007-03-10 01:50:52.000000000 +0100 @@ -153,7 +153,10 @@ First checkin #include #endif -#if defined(AF_INET6) && HAVE_IPV6 && !HAVE_LINUX +#if defined(AF_INET6) && HAVE_IPV6 && !HAVE_LINUX && !defined(sun) +#if defined(__FreeBSD__) || defined(__DragonFly__) +#include +#endif #include #endif @@ -203,6 +206,8 @@ struct ifi_info *get_ifi_info_linuxv6(in addr[4],addr[5],addr[6],addr[7], &index, &plen, &scope, &flags, ifname) != EOF) { + char ipv6addr[INET6_ADDRSTRLEN]; + myflags = 0; if (strncmp(lastname, ifname, IFNAMSIZ) == 0) { if (doaliases == 0) @@ -237,7 +242,6 @@ struct ifi_info *get_ifi_info_linuxv6(in memcpy(ifi->ifi_addr, res0->ai_addr, sizeof(struct sockaddr_in6)); /* Add netmask of the interface */ - char ipv6addr[INET6_ADDRSTRLEN]; plen_to_mask(plen, ipv6addr); ifi->ifi_netmask = calloc(1, sizeof(struct sockaddr_in6)); if (ifi->ifi_addr == NULL) {