Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 77821b6

Browse files
committed
Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
Patch by Philipp Hagemeister.
2 parents 4941774 + a9a53c7 commit 77821b6

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ Core and Builtins
7272
Library
7373
-------
7474

75+
- Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo()
76+
emulation code. Patch by Philipp Hagemeister.
77+
7578
- Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use
7679
the correct term for it). Original patch by Eric Snow.
7780

Modules/getaddrinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ getaddrinfo(const char*hostname, const char*servname,
430430
break;
431431
#ifdef ENABLE_IPV6
432432
case AF_INET6:
433-
pfx = ((struct in6_addr *)pton)->s6_addr8[0];
433+
pfx = ((struct in6_addr *)pton)->s6_addr[0];
434434
if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
435435
pai->ai_flags &= ~AI_CANONNAME;
436436
break;

Modules/getnameinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
161161
break;
162162
#ifdef ENABLE_IPV6
163163
case AF_INET6:
164-
pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0];
164+
pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[0];
165165
if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
166166
flags |= NI_NUMERICHOST;
167167
break;

0 commit comments

Comments
 (0)