about summary refs log tree commit homepage
path: root/ext/raindrops/extconf.rb
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2023-06-09 19:48:05 +0900
committerEric Wong <bofh@yhbt.net>2023-06-11 20:17:50 +0000
commitb3212417cc3e7cc44aa9e1ffe89b0d62ef3fdab5 (patch)
tree989dc805c36cff204b5f3ef7b33cf5e65c3c4dfb /ext/raindrops/extconf.rb
parentd843802120e7cb01659b93917c29e3ba014216f1 (diff)
downloadraindrops-b3212417cc3e7cc44aa9e1ffe89b0d62ef3fdab5.tar.gz
Prefer to use `rb_io_descriptor` in my_fileno if it is available. This
function was introduced in Ruby 3.1. Ruby 3.3 will deprecate access to
all internal fields of `rb_io_t`.

This change is necessary for compatibility with the current
ruby.git master:

	https://bugs.ruby-lang.org/issues/19057#note-17
Diffstat (limited to 'ext/raindrops/extconf.rb')
-rw-r--r--ext/raindrops/extconf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/raindrops/extconf.rb b/ext/raindrops/extconf.rb
index 792e509..1733703 100644
--- a/ext/raindrops/extconf.rb
+++ b/ext/raindrops/extconf.rb
@@ -4,6 +4,7 @@ require 'shellwords'
 dir_config('atomic_ops')
 have_func('mmap', 'sys/mman.h') or abort 'mmap() not found'
 have_func('munmap', 'sys/mman.h') or abort 'munmap() not found'
+have_func('rb_io_descriptor')
 
 $CPPFLAGS += " -D_GNU_SOURCE "
 have_func('mremap', 'sys/mman.h')