From: Antoine Pitrou Date: Thu, 2 Aug 2012 18:37:12 +0000 (+0200) Subject: Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code. X-Git-Tag: v2.7.5~109^2~414 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fa9f7b3d1d5c90cb231946a6edaf7f748e07436;p=python Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code. Patch by Philipp Hagemeister. --- diff --git a/Misc/ACKS b/Misc/ACKS index 3d2393c572..39ba2a9be1 100644 --- 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 diff --git a/Misc/NEWS b/Misc/NEWS index e989b5b08d..635f847bff 100644 --- 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. diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c index 1d0bfbba87..9d054d0462 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 7892ae9eca..f7985c9acd 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;