diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index dadf66cc0..4119c72c4 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -49,7 +49,7 @@ have_func("rb_io_descriptor") have_func("rb_io_maybe_wait(0, Qnil, Qnil, Qnil)", "ruby/io.h") # Ruby 3.1 -have_var("rb_eIOTimeoutError", "ruby/io.h") +have_func("rb_io_timeout", "ruby/io.h") Logging::message "=== Checking for system dependent stuff... ===\n" have_library("nsl", "t_open") diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 3735a57f8..9f374b65f 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -1725,7 +1725,7 @@ no_exception_p(VALUE opts) #define RUBY_IO_TIMEOUT_DEFAULT Qnil #endif -#ifdef HAVE_RB_EIOTIMEOUTERROR +#ifdef HAVE_RB_IO_TIMEOUT #define IO_TIMEOUT_ERROR rb_eIOTimeoutError #else #define IO_TIMEOUT_ERROR rb_eIOError