Skip to content

Fix Io\Poll\Context::wait() epoll_pwait2 detection on x86 (container) - #23478

Closed
marc-mabe wants to merge 1 commit into
php:masterfrom
marc-mabe:fix_HAVE_EPOLL_PWAIT2
Closed

marc-mabe wants to merge 1 commit into
php:masterfrom
marc-mabe:fix_HAVE_EPOLL_PWAIT2

Conversation

@marc-mabe

Copy link
Copy Markdown
Contributor

Detect epoll_pwait2 by checking for ENOSYS/ENOTSUP errno before defining HAVE_EPOLL_PWAIT2

Without this additional check HAVE_EPOLL_PWAIT2 got defined on my i386 container but failing constantly with ENOTSUP.
(via Mac -> Lima -> Ubuntu + qemu -> docker (linux/amd64) -> PKG_CONFIG_PATH/CFLAGS/LDFLAGS to i386-linux-gnu/-m32 🙈 )

Comment thread build/php.m4 Outdated
Comment thread build/php.m4 Outdated

@petk petk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should work ok (if the additional cross-compilation variable isn't an issue - php-src requires a lot of cross-compilation adjustments, otherwise). I can't test this ATM. And probably would be good to have @bukka glance over these a bit also.

@petk
petk requested a review from bukka August 30, 2026 17:52
Detect epoll_pwait2 by checking for ENOSYS/ENOTSUP errno before defining HAVE_EPOLL_PWAIT2
@marc-mabe
marc-mabe force-pushed the fix_HAVE_EPOLL_PWAIT2 branch from 49a5dfd to c733497 Compare August 31, 2026 07:08
@DanielEScherzer DanielEScherzer added this to the PHP 8.6 milestone Sep 2, 2026
@bukka

bukka commented Sep 21, 2026

Copy link
Copy Markdown
Member

I would prefer to do runtime fallback like we do for copy_file_range . That should be more reliable and the overhead is negligible.

@bukka

bukka commented Sep 21, 2026

Copy link
Copy Markdown
Member

That's done in #23825 . It should be safer.

@bukka bukka closed this Sep 21, 2026
@marc-mabe

Copy link
Copy Markdown
Contributor Author

Agree thanks @bukka

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants