diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-02 18:39:10 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-02 18:39:10 (GMT) |
commit | 77821b68a7f23318374087e9c6710ef66312f78d (patch) | |
tree | cec2d15f6ab0721c5a83754b6c24f7a895ff260d | |
parent | 4941774f59ae808a764e29e09abfedf6fc199ed3 (diff) | |
parent | a9a53c7dc055b54133f2dee33f1834d7566de842 (diff) | |
download | cpython-77821b68a7f23318374087e9c6710ef66312f78d.zip cpython-77821b68a7f23318374087e9c6710ef66312f78d.tar.gz cpython-77821b68a7f23318374087e9c6710ef66312f78d.tar.bz2 |
Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
Patch by Philipp Hagemeister.
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/getaddrinfo.c | 2 | ||||
-rw-r--r-- | Modules/getnameinfo.c | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -72,6 +72,9 @@ Core and Builtins 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 index a3ca30a..e2a2edf 100644 --- a/Modules/getaddrinfo.c +++ b/Modules/getaddrinfo.c @@ -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; diff --git a/Modules/getnameinfo.c b/Modules/getnameinfo.c index e9aeafb..f014c11 100644 --- a/Modules/getnameinfo.c +++ b/Modules/getnameinfo.c @@ -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; |