]> granicus.if.org Git - python/commitdiff
Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 2 Aug 2012 18:37:12 +0000 (20:37 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 2 Aug 2012 18:37:12 +0000 (20:37 +0200)
Patch by Philipp Hagemeister.

Misc/ACKS
Misc/NEWS
Modules/getaddrinfo.c
Modules/getnameinfo.c

index 3d2393c572c7f5f95ddb09e497ac4f8b32eb4d00..39ba2a9be16dac98b8a92693fe69eb4c734fdb71 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -323,6 +323,7 @@ Michael Guravage
 Lars Gustäbel
 Thomas Güttler
 Barry Haddow
+Philipp Hagemeister
 Paul ten Hagen
 Rasmus Hahn
 Peter Haight
index e989b5b08dba8842a8793840d643a0e85cad7638..635f847bff33f048b21718c44d495c31bed5a484 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -92,6 +92,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo()
+  emulation code.  Patch by Philipp Hagemeister.
+
 - Issue #9803: Don't close IDLE on saving if breakpoint is open.
   Patch by Roger Serwy.
 
index 1d0bfbba8743472771bbfef3cbeb88627d625387..9d054d04621fe70066363c18988629d809e49ad7 100644 (file)
@@ -430,7 +430,7 @@ getaddrinfo(const char*hostname, const char*servname,
                 break;
 #ifdef ENABLE_IPV6
             case AF_INET6:
-                pfx = ((struct in6_addr *)pton)->s6_addr8[0];
+                pfx = ((struct in6_addr *)pton)->s6_addr[0];
                 if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
                     pai->ai_flags &= ~AI_CANONNAME;
                 break;
index 7892ae9ecab4dc7a4d5a9884392f5938c12ade8d..f7985c9acde0b24cf0ceb996f4c99e6038ed5848 100644 (file)
@@ -161,7 +161,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
         break;
 #ifdef ENABLE_IPV6
     case AF_INET6:
-        pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0];
+        pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[0];
         if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
             flags |= NI_NUMERICHOST;
         break;