From 3a958a18070f4bc62e4376dc18e2c0731ce60b5b Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 14 Sep 2023 23:42:56 +0000 Subject: [PATCH] satisfy non-c99 compilers --- usr.sbin/unbound/util/net_help.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/unbound/util/net_help.c b/usr.sbin/unbound/util/net_help.c index e559c9b2fa6..dec46da20e2 100644 --- a/usr.sbin/unbound/util/net_help.c +++ b/usr.sbin/unbound/util/net_help.c @@ -809,6 +809,7 @@ addr_to_nat64(const struct sockaddr_storage* addr, struct sockaddr_in *sin = (struct sockaddr_in *)addr; struct sockaddr_in6 *sin6; uint8_t *v4_byte; + int i; /* This needs to be checked by the caller */ log_assert(addr->ss_family == AF_INET); @@ -826,7 +827,7 @@ addr_to_nat64(const struct sockaddr_storage* addr, nat64_prefixnet = nat64_prefixnet / 8; v4_byte = (uint8_t *)&sin->sin_addr.s_addr; - for(int i = 0; i < 4; i++) { + for(i = 0; i < 4; i++) { if(nat64_prefixnet == 8) { /* bits 64...71 are MBZ */ sin6->sin6_addr.s6_addr[nat64_prefixnet++] = 0; -- 2.20.1