From 3ecc3eedded2c5b7ca08c47776e7f5ccd14a7980 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 9 Mar 2026 09:46:38 -0700 Subject: [PATCH] ext: allow epoll_pwait2 to be disabled via --disable-epoll_pwait2 Some distributions (e.g. RedHat 9.7) ship glibc 2.34 with backported epoll_pwait2 support tagged as GLIBC_2.35, causing binaries built there to fail on systems with a true glibc 2.34 (RedHat 9.6). Wrapping the have_func check in enable_config allows the caller to opt out at build time. If your system has a backported `epoll_pwait2` that causes portability issues, you can disable it at build time: ``` gem install io-event -- --disable-epoll_pwait2 ``` With `bundle`: ``` bundle config set build.io-event --disable-epoll_pwait2 bundle install ``` --- ext/extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/extconf.rb b/ext/extconf.rb index 9bd4e0b..6d92cf9 100755 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -54,7 +54,7 @@ have_func("&rb_process_status_wait") have_func("rb_fiber_current") have_func("&rb_fiber_raise") -have_func("epoll_pwait2") +have_func("epoll_pwait2") if enable_config("epoll_pwait2", true) have_header("ruby/io/buffer.h")