]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Avoid name clashes on Solaris derived systems. 9348/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 20 Jul 2020 14:13:29 +0000 (16:13 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 20 Jul 2020 14:13:29 +0000 (16:13 +0200)
Fixes #9279

pdns/iputils.hh
pdns/lua-record.cc

index 968864100abab752fb406af488c02206d5838b51..88d383a1dce00f89a2f556b88c0ea589dfe8ff6b 100644 (file)
@@ -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<<index)) != 0x00000000);
+      return ((ls_addr & (1<<index)) != 0x00000000);
     }
     if(isIPv6()) {
       if (index >= 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;
   }
index 50bbf48e7422c2fb9a5c2bdf5a185c7005d7e175..cda2d4e57a83c3bffc6284a7ee15cdd73b8c6264 100644 (file)
@@ -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();
       }