]> 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/NEWS
Modules/getaddrinfo.c
Modules/getnameinfo.c

index 671878f44a973d308aa5e5f3f4591145497e14d1..14121df8f922e7d19103eb0d1e17cc792c64e994 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -98,6 +98,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 a3ca30ac29cedd31879df8352fcdbed075e0459f..e2a2edf82d3c91b19b12f9e7d5a528d6e7181078 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 e9aeafb199fbf8362e1c68c0d3934b7ef363214d..f014c11ae157e4a36d88bb0354ee1debc31432a4 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;