diff options
Diffstat (limited to 'ext/pty/extconf.rb')
-rw-r--r-- | ext/pty/extconf.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb index 038bdf4d2c..da3655cf4d 100644 --- a/ext/pty/extconf.rb +++ b/ext/pty/extconf.rb @@ -7,14 +7,19 @@ if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM have_header("sys/stropts.h") have_func("setresuid") have_header("libutil.h") - have_header("util.h") # OpenBSD openpty have_header("pty.h") have_header("pwd.h") - util = have_library("util", "openpty") - if have_func("posix_openpt") or + if /openbsd/ =~ RUBY_PLATFORM + have_header("util.h") # OpenBSD openpty + util = have_library("util", "openpty") + end + 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 |