summaryrefslogtreecommitdiff
path: root/ext/pty/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pty/extconf.rb')
-rw-r--r--ext/pty/extconf.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb
index ba0c4286fd..da3655cf4d 100644
--- a/ext/pty/extconf.rb
+++ b/ext/pty/extconf.rb
@@ -13,10 +13,13 @@ if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
have_header("util.h") # OpenBSD openpty
util = have_library("util", "openpty")
end
- if have_func("posix_openpt") or
+ openpt = have_func("posix_openpt")
+ if openpt
+ have_func("ptsname_r") or have_func("ptsname")
+ end
+ if openpt or
(util or have_func("openpty")) or
have_func("_getpty") or
- have_func("ptsname") or
have_func("ioctl")
create_makefile('pty')
end