From: Otto Moerbeek Date: Mon, 20 Jul 2020 14:13:29 +0000 (+0200) Subject: Avoid name clashes on Solaris derived systems. X-Git-Tag: dnsdist-1.5.0~9^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9348%2Fhead;p=thirdparty%2Fpdns.git Avoid name clashes on Solaris derived systems. Fixes #9279 --- diff --git a/pdns/iputils.hh b/pdns/iputils.hh index 968864100a..88d383a1dc 100644 --- a/pdns/iputils.hh +++ b/pdns/iputils.hh @@ -339,9 +339,9 @@ union ComboAddress { index = 32 + index; } - uint32_t s_addr = ntohl(sin4.sin_addr.s_addr); + uint32_t ls_addr = ntohl(sin4.sin_addr.s_addr); - return ((s_addr & (1<= 128) @@ -352,11 +352,11 @@ union ComboAddress { index = 128 + index; } - uint8_t *s_addr = (uint8_t*)sin6.sin6_addr.s6_addr; + uint8_t *ls_addr = (uint8_t*)sin6.sin6_addr.s6_addr; uint8_t byte_idx = index / 8; uint8_t bit_idx = index % 8; - return ((s_addr[15-byte_idx] & (1 << bit_idx)) != 0x00); + return ((ls_addr[15-byte_idx] & (1 << bit_idx)) != 0x00); } return false; } diff --git a/pdns/lua-record.cc b/pdns/lua-record.cc index 50bbf48e74..cda2d4e57a 100644 --- a/pdns/lua-record.cc +++ b/pdns/lua-record.cc @@ -660,12 +660,12 @@ static void setupLuaRecords() for(int i=0; i<8; ++i) { if(i) together+=":"; - string quad; + string lquad; for(int j=0; j <4; ++j) { - quad.append(1, labels[31-i*4-j][0]); + lquad.append(1, labels[31-i*4-j][0]); together += labels[31-i*4-j][0]; } - quads.push_back(quad); + quads.push_back(lquad); } ComboAddress ip6(together,0); @@ -685,8 +685,8 @@ static void setupLuaRecords() fmt % labels[i]; fmt % dashed; - for(const auto& quad : quads) - fmt % quad; + for(const auto& lquad : quads) + fmt % lquad; return fmt.str(); }