Skip to content

Commit

Permalink
Fix detection?
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 29, 2023
1 parent 8a0cff6 commit 81309f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions ext/openssl/extconf.rb
Expand Up @@ -18,8 +18,6 @@

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

have_func("rb_io_descriptor")

##
# Adds -DOSSL_DEBUG for compilation and some more targets when GCC is used
# To turn it on, use: --with-debug or --enable-debug
Expand All @@ -29,6 +27,7 @@
end
$defs.push("-D""OPENSSL_SUPPRESS_DEPRECATED")

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

Logging::message "=== Checking for system dependent stuff... ===\n"
Expand Down
3 changes: 2 additions & 1 deletion ext/openssl/ossl_ssl.c
Expand Up @@ -1655,12 +1655,13 @@ ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)

#ifndef HAVE_RB_IO_DESCRIPTOR
static int
rb_io_descriptor(VALUE io)
io_descriptor_fallback(VALUE io)
{
rb_io_t *fptr;
GetOpenFile(io, fptr);
return fptr->fd;
}
#define rb_io_descriptor io_descriptor_fallback
#endif

static VALUE
Expand Down

0 comments on commit 81309f2

Please sign in to comment.