Skip to content

Commit

Permalink
bpo-45743: Move __APPLE_USE_RFC_3542 into socketmodule.c (pythonGH-29456
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tiran authored and remykarem committed Dec 7, 2021
1 parent e69fa42 commit b675a1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Local naming conventions:
*/

#ifdef __APPLE__
// Issue #35569: Expose RFC 3542 socket options.
#define __APPLE_USE_RFC_3542 1
#include <AvailabilityMacros.h>
/* for getaddrinfo thread safety test on old versions of OS X */
#ifndef MAC_OS_X_VERSION_10_5
Expand Down
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,13 +1222,7 @@ def detect_crypt(self):
self.add(Extension('_crypt', ['_cryptmodule.c'], libraries=libs))

def detect_socket(self):
# socket(2)
kwargs = {'depends': ['socketmodule.h']}
if MACOS:
# Issue #35569: Expose RFC 3542 socket options.
kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']

self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
self.add(Extension('_socket', ['socketmodule.c'], depends=['socketmodule.h']))

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

0 comments on commit b675a1e

Please sign in to comment.