Skip to content

Commit a9a53c7

Browse files
committed
Issue python#15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
Patch by Philipp Hagemeister.
1 parent f37c0c7 commit a9a53c7

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
@@ -98,6 +98,9 @@ Core and Builtins
9898
Library
9999
-------
100100

101+
- Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo()
102+
emulation code. Patch by Philipp Hagemeister.
103+
101104
- Issue #9803: Don't close IDLE on saving if breakpoint is open.
102105
Patch by Roger Serwy.
103106

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)