mirror of https://github.com/python/cpython
Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
Patch by Philipp Hagemeister.
This commit is contained in:
commit
77821b68a7
|
@ -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.
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue