[Python-checkins] cpython (merge 3.2 -> default): Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation

antoine.pitrou python-checkins at python.org
Thu Aug 2 20:42:21 CEST 2012


http://hg.python.org/cpython/rev/61a56e982e98
changeset: 78385:61a56e982e98
parent: 78382:1f8351cf00f3
parent: 78384:547f3a55a216
user: Antoine Pitrou <solipsis at pitrou.net>
date: Thu Aug 02 20:39:10 2012 +0200
summary:
 Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
Patch by Philipp Hagemeister.
files:
 Misc/NEWS | 3 +++
 Modules/getaddrinfo.c | 2 +-
 Modules/getnameinfo.c | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -72,6 +72,9 @@
 Library
 -------
 
+- Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo()
+ emulation code. Patch by Philipp Hagemeister.
+
 - Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use
 the correct term for it). Original patch by Eric Snow.
 
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c
--- a/Modules/getaddrinfo.c
+++ b/Modules/getaddrinfo.c
@@ -430,7 +430,7 @@
 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;
diff --git a/Modules/getnameinfo.c b/Modules/getnameinfo.c
--- a/Modules/getnameinfo.c
+++ b/Modules/getnameinfo.c
@@ -161,7 +161,7 @@
 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;
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /