2 To expose the CMSG_ macros and new recvmsg() semantics, the socket module
3 needs to be built in an XPG6 environment.
5 diff -wpruN '--exclude=*.orig' a~/setup.py a/setup.py
6 --- a~/setup.py 1970-01-01 00:00:00
7 +++ a/setup.py 1970-01-01 00:00:00
8 @@ -1156,6 +1156,10 @@ class PyBuildExt(build_ext):
10 # Issue #35569: Expose RFC 3542 socket options.
11 kwargs['extra_compile_args'] = ['-D__APPLE_USE_RFC_3542']
13 + kwargs['libraries'] = ['socket', 'nsl']
14 + kwargs['extra_compile_args'] = ['-D_XOPEN_SOURCE=600',
15 + '-D__EXTENSIONS__=1']
17 self.add(Extension('_socket', ['socketmodule.c'], **kwargs))
18 elif self.compiler.find_library_file(self.lib_dirs, 'net'):