From a3739f30286439a09dd8c634f22fd07fdc9c9a94 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 20 Jul 2020 16:13:29 +0200 Subject: [PATCH] Avoid name clashes on Solaris derived systems. Fixes #9279 --- pdns/iputils.hh | 8 ++++---- pdns/lua-record.cc | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) 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(); } -- 2.47.2