summaryrefslogtreecommitdiff
path: root/ext/io/wait/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/io/wait/extconf.rb')
-rw-r--r--ext/io/wait/extconf.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/io/wait/extconf.rb b/ext/io/wait/extconf.rb
index ea7dc9f6cf..1352ef202e 100644
--- a/ext/io/wait/extconf.rb
+++ b/ext/io/wait/extconf.rb
@@ -3,10 +3,15 @@ target = "io/wait"
unless macro_defined?("DOSISH", "#include <ruby.h>")
fionread = %w[sys/ioctl.h sys/filio.h].find do |h|
- checking_for("FIONREAD") {macro_defined?("FIONREAD", "#include <#{h}>\n")}
+ checking_for("FIONREAD") {have_macro("FIONREAD", h)}
end
if fionread
$defs << "-DFIONREAD_HEADER=\"<#{fionread}>\""
create_makefile(target)
end
+else
+ if have_func("rb_w32_ioctlsocket", "ruby.h")
+ have_func("rb_w32_is_socket", "ruby.h")
+ create_makefile(target)
+ end
end