summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-01 10:58:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-01 10:58:27 +0900
commit520ac5da22c30d6db25de6dcbff9607d8a9cd870 (patch)
tree649789d9c26ae656a2d389d0df4b727ae157ea3b
parent9014c900b66514cdb12c77115d5fcd7cf7a4c3c3 (diff)
[pty] do not check openpty twice if found in util library
-rw-r--r--ext/pty/extconf.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb
index 7721a744c8..038bdf4d2c 100644
--- a/ext/pty/extconf.rb
+++ b/ext/pty/extconf.rb
@@ -10,9 +10,9 @@ if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
have_header("util.h") # OpenBSD openpty
have_header("pty.h")
have_header("pwd.h")
- have_library("util", "openpty")
+ util = have_library("util", "openpty")
if have_func("posix_openpt") or
- have_func("openpty") or
+ (util or have_func("openpty")) or
have_func("_getpty") or
have_func("ptsname") or
have_func("ioctl")