Bug report
Bug description
On Solaris and illumos, socket.sendmsg, recvmsg, and the CMSG_* macros aren't available:
>>> import socket; hasattr(socket.socket, 'sendmsg')
False
>>> import multiprocessing; multiprocessing.get_all_start_methods()
['fork', 'spawn'] # no 'forkserver'
Consequently multiprocessing.reduction.HAVE_SEND_HANDLE is False and the forkserver start method is unavailable (forkserver passes worker file descriptors over a Unix socket via sendmsg+SCM_RIGHTS). This makes test_socket ancillary-data tests and forkserver-based test_multiprocessing_forkserver / test_concurrent_futures tests fail or error.
Cause
On Solaris the ancillary-data API is declared only when _XOPEN_SOURCE >= 600 (XPG6). But configure.ac deliberately leaves _XOPEN_SOURCE undefined on Solaris (relying on __EXTENSIONS__), because historically _XOPEN_SOURCE hid other features there (bpo-1759169). So the socket module builds without sendmsg/recvmsg. This exact problem was reported in gh-57208 (2011) and closed unresolved.
Fix
Define _XOPEN_SOURCE=600 on Solaris. __EXTENSIONS__ (now reliably defined by AC_USE_SYSTEM_EXTENSIONS) re-enables the platform features _XOPEN_SOURCE would otherwise hide — the same combination the OpenIndiana system Python already builds with (-D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6). Verified on OpenIndiana (illumos) 2026: sendmsg/recvmsg/CMSG_* are built, forkserver becomes available, the full build is clean, and the affected test suites pass.
Linked PRs
Bug report
Bug description
On Solaris and illumos,
socket.sendmsg,recvmsg, and theCMSG_*macros aren't available:Consequently
multiprocessing.reduction.HAVE_SEND_HANDLEis False and the forkserver start method is unavailable (forkserver passes worker file descriptors over a Unix socket viasendmsg+SCM_RIGHTS). This makestest_socketancillary-data tests and forkserver-basedtest_multiprocessing_forkserver/test_concurrent_futurestests fail or error.Cause
On Solaris the ancillary-data API is declared only when
_XOPEN_SOURCE >= 600(XPG6). Butconfigure.acdeliberately leaves_XOPEN_SOURCEundefined on Solaris (relying on__EXTENSIONS__), because historically_XOPEN_SOURCEhid other features there (bpo-1759169). So the socket module builds withoutsendmsg/recvmsg. This exact problem was reported in gh-57208 (2011) and closed unresolved.Fix
Define
_XOPEN_SOURCE=600on Solaris.__EXTENSIONS__(now reliably defined byAC_USE_SYSTEM_EXTENSIONS) re-enables the platform features_XOPEN_SOURCEwould otherwise hide — the same combination the OpenIndiana system Python already builds with (-D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6). Verified on OpenIndiana (illumos) 2026:sendmsg/recvmsg/CMSG_*are built, forkserver becomes available, the full build is clean, and the affected test suites pass.Linked PRs