diff --git a/lib/isc/netscope.c b/lib/isc/netscope.c index bca2d13801..68a0a8dc14 100644 --- a/lib/isc/netscope.c +++ b/lib/isc/netscope.c @@ -18,6 +18,7 @@ #include #include #include +#include isc_result_t isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) { @@ -26,9 +27,13 @@ isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) { unsigned int ifid; struct in6_addr *in6; #endif /* ifdef HAVE_IF_NAMETOINDEX */ - uint32_t zone; + uint32_t zone = 0; uint64_t llz; +#ifndef HAVE_IF_NAMETOINDEX + UNUSED(addr); +#endif + /* at this moment, we only support AF_INET6 */ if (af != AF_INET6) { return (ISC_R_FAILURE);