gh-154271: Define _XOPEN_SOURCE=600 on Solaris to enable socket ancillary data and forkserver#154273
gh-154271: Define _XOPEN_SOURCE=600 on Solaris to enable socket ancillary data and forkserver#154273serhiy-storchaka wants to merge 3 commits into
Conversation
… ancillary data and forkserver Solaris declares the socket ancillary-data API (CMSG_*, sendmsg(), recvmsg()) only under _XOPEN_SOURCE >= 600. __EXTENSIONS__ keeps the other platform features. This enables the forkserver start method. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
87a92c1 to
21d8670
Compare
|
@kulikjak, could you please look at this and verify if it is a correct change for real Solaris? |
|
Thanks for the ping, Serhiy. Interestingly, on Oracle Solaris, The header files are likely slightly different now compared to Illumos. That said, I built and tested it with your change and everything seems to work as before. One minor thing I noticed is that the configure now says: and then it's defined, which might be a little confusing. |
Move the Solaris definition into the same conditional as the general one, so that all _XOPEN_SOURCE decisions are together. The socket ancillary data API is gated on _XOPEN_SOURCE only on illumos; Solaris declares it anyway. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for testing it! Then the gap is illumos-specific -- I reworded the comment and the NEWS entry. The confusing check is Autoconf's own, from |
On Solaris/illumos the X/Open socket ancillary-data API (
CMSG_*,sendmsg(),recvmsg()) is declared only under_XOPEN_SOURCE>=600, butconfigure.acleft it undefined there (historically because it hides other features — gh-57208, bpo-1759169). So the socket module built withoutsendmsg/recvmsg, makingmultiprocessing.reduction.HAVE_SEND_HANDLEFalse and theforkserverstart method unavailable.Define
_XOPEN_SOURCE=600on Solaris;__EXTENSIONS__(fromAC_USE_SYSTEM_EXTENSIONS) re-enables the platform features it would otherwise hide — the same combination the OpenIndiana system Python builds with. Verified on OpenIndiana (illumos):sendmsg/recvmsg/CMSG_*are built, forkserver becomes available, full build clean, andtest_socket/test_multiprocessing_forkserver/test_concurrent_futurespass.Related: GH-154272 (test-robustness fix for platforms that genuinely lack forkserver).
🤖 Generated with Claude Code