Skip to content

gh-154271: Define _XOPEN_SOURCE=600 on Solaris to enable socket ancillary data and forkserver#154273

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:solaris-xopen-source
Open

gh-154271: Define _XOPEN_SOURCE=600 on Solaris to enable socket ancillary data and forkserver#154273
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:solaris-xopen-source

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 20, 2026

Copy link
Copy Markdown
Member

On Solaris/illumos the X/Open socket ancillary-data API (CMSG_*, sendmsg(), recvmsg()) is declared only under _XOPEN_SOURCE>=600, but configure.ac left it undefined there (historically because it hides other features — gh-57208, bpo-1759169). So the socket module built without sendmsg/recvmsg, making multiprocessing.reduction.HAVE_SEND_HANDLE False and the forkserver start method unavailable.

Define _XOPEN_SOURCE=600 on Solaris; __EXTENSIONS__ (from AC_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, and test_socket / test_multiprocessing_forkserver / test_concurrent_futures pass.

Related: GH-154272 (test-robustness fix for platforms that genuinely lack forkserver).

🤖 Generated with Claude Code

… 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>
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

@kulikjak, could you please look at this and verify if it is a correct change for real Solaris?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review build The build process and cross-build extension-modules C modules in the Modules dir topic-multiprocessing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant