Kaydet (Commit) 1fa9f7b3 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code.

Patch by Philipp Hagemeister.
üst 4c36aa41
...@@ -323,6 +323,7 @@ Michael Guravage ...@@ -323,6 +323,7 @@ Michael Guravage
Lars Gustäbel Lars Gustäbel
Thomas Güttler Thomas Güttler
Barry Haddow Barry Haddow
Philipp Hagemeister
Paul ten Hagen Paul ten Hagen
Rasmus Hahn Rasmus Hahn
Peter Haight Peter Haight
......
...@@ -92,6 +92,9 @@ Core and Builtins ...@@ -92,6 +92,9 @@ Core and Builtins
Library 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. - Issue #9803: Don't close IDLE on saving if breakpoint is open.
Patch by Roger Serwy. Patch by Roger Serwy.
......
...@@ -430,7 +430,7 @@ getaddrinfo(const char*hostname, const char*servname, ...@@ -430,7 +430,7 @@ getaddrinfo(const char*hostname, const char*servname,
break; break;
#ifdef ENABLE_IPV6 #ifdef ENABLE_IPV6
case AF_INET6: 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) if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
pai->ai_flags &= ~AI_CANONNAME; pai->ai_flags &= ~AI_CANONNAME;
break; break;
......
...@@ -161,7 +161,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) ...@@ -161,7 +161,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
break; break;
#ifdef ENABLE_IPV6 #ifdef ENABLE_IPV6
case AF_INET6: 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) if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
flags |= NI_NUMERICHOST; flags |= NI_NUMERICHOST;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment