Skip to content

Commit ae17650

Browse files
author
Erlend E. Aasland
committed
bpo-35569: Expose RFC 3542 socket options on macOS
From macOS SDK netinet6/in6.h: RFC 3542 define the following socket options in a manner incompatible with RFC 2292: IPV6_PKTINFO IPV6_HOPLIMIT IPV6_NEXTHOP IPV6_HOPOPTS IPV6_DSTOPTS IPV6_RTHDR To use the new IPv6 Sockets options introduced by RFC 3542 the constant __APPLE_USE_RFC_3542 must be defined before including <netinet/in.h> [...] Note that eventually RFC 3542 is going to be the default and RFC 2292 will be obsolete.
1 parent 4044c84 commit ae17650

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Expose RFC 3542 IPv6 socket options.

configure

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7421,6 +7421,9 @@ $as_echo "$ac_cv_enable_visibility" >&6; }
74217421
;;
74227422

74237423
Darwin*)
7424+
# Issue #35569: Expose the RFC 3542 socket options.
7425+
CFLAGS="-D__APPLE_USE_RFC_3542 ${CFLAGS}"
7426+
74247427
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
74257428
# used to be here, but non-Apple gcc doesn't accept them.
74267429
if test "${CC}" = gcc

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,6 +1844,9 @@ yes)
18441844
;;
18451845

18461846
Darwin*)
1847+
# Issue #35569: Expose the RFC 3542 socket options.
1848+
CFLAGS="-D__APPLE_USE_RFC_3542 ${CFLAGS}"
1849+
18471850
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
18481851
# used to be here, but non-Apple gcc doesn't accept them.
18491852
if test "${CC}" = gcc

0 commit comments

Comments
 (0)