Skip to content

Commit 24af9a4

Browse files
authored
bpo-45743: Move __APPLE_USE_RFC_3542 into socketmodule.c (GH-29456)
1 parent 122ca4d commit 24af9a4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Modules/socketmodule.c

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ Local naming conventions:
8686
*/
8787

8888
#ifdef __APPLE__
89+
// Issue #35569: Expose RFC 3542 socket options.
90+
#define __APPLE_USE_RFC_3542 1
8991
#include <AvailabilityMacros.h>
9092
/* for getaddrinfo thread safety test on old versions of OS X */
9193
#ifndef MAC_OS_X_VERSION_10_5

setup.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1222,13 +1222,7 @@ def detect_crypt(self):
12221222
self.add(Extension('_crypt', ['_cryptmodule.c'], libraries=libs))
12231223

12241224
def detect_socket(self):
1225-
# socket(2)
1226-
kwargs = {'depends': ['socketmodule.h']}
1227-
if MACOS:
1228-
# Issue #35569: Expose RFC 3542 socket options.
1229-
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
1230-
1231-
self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
1225+
self.add(Extension('_socket', ['socketmodule.c'], depends=['socketmodule.h']))
12321226

12331227
def detect_dbm_gdbm(self):
12341228
# Modules that provide persistent dictionary-like semantics. You will

0 commit comments

Comments
 (0)