diff options
-rw-r--r-- | ext/pty/extconf.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb index 038bdf4d2c..ba0c4286fd 100644 --- a/ext/pty/extconf.rb +++ b/ext/pty/extconf.rb @@ -7,10 +7,12 @@ 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 /openbsd/ =~ RUBY_PLATFORM + have_header("util.h") # OpenBSD openpty + util = have_library("util", "openpty") + end if have_func("posix_openpt") or (util or have_func("openpty")) or have_func("_getpty") or |