Skip to content

Commit 81309f2

Browse files
committed
Fix detection?
1 parent 8a0cff6 commit 81309f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/openssl/extconf.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
Logging::message "=== OpenSSL for Ruby configurator ===\n"
2020

21-
have_func("rb_io_descriptor")
22-
2321
##
2422
# Adds -DOSSL_DEBUG for compilation and some more targets when GCC is used
2523
# To turn it on, use: --with-debug or --enable-debug
@@ -29,6 +27,7 @@
2927
end
3028
$defs.push("-D""OPENSSL_SUPPRESS_DEPRECATED")
3129

30+
have_func("rb_io_descriptor")
3231
have_func("rb_io_maybe_wait(0, Qnil, Qnil, Qnil)", "ruby/io.h") # Ruby 3.1
3332

3433
Logging::message "=== Checking for system dependent stuff... ===\n"

ext/openssl/ossl_ssl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,12 +1655,13 @@ ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
16551655

16561656
#ifndef HAVE_RB_IO_DESCRIPTOR
16571657
static int
1658-
rb_io_descriptor(VALUE io)
1658+
io_descriptor_fallback(VALUE io)
16591659
{
16601660
rb_io_t *fptr;
16611661
GetOpenFile(io, fptr);
16621662
return fptr->fd;
16631663
}
1664+
#define rb_io_descriptor io_descriptor_fallback
16641665
#endif
16651666

16661667
static VALUE

0 commit comments

Comments
 (0)