Skip to content

Commit 28cdf86

Browse files
committed
Win32: ttyname will not be used
1 parent 4cfaca6 commit 28cdf86

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ext/io/console/extconf.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
hdr = nil
2424
case
2525
when macro_defined?("_WIN32", "")
26+
win32 = true
2627
# rb_w32_map_errno: 1.8.7
2728
vk_header = File.exist?("#$srcdir/win32_vk.list") ? "chksum" : "inc"
2829
vk_header = "#{'{$(srcdir)}' if $nmake == ?m}win32_vk.#{vk_header}"
@@ -47,7 +48,7 @@
4748
elsif have_func("rb_scheduler_timeout") # Ruby 3.0 (internal)
4849
have_func("rb_io_wait") # Ruby 3.0
4950
end
50-
have_func("ttyname_r") or have_func("ttyname")
51+
win32 or have_func("ttyname_r") or have_func("ttyname")
5152
create_makefile("io/console") {|conf|
5253
conf << "\n""VK_HEADER = #{vk_header}\n"
5354
}

0 commit comments

Comments
 (0)