From 520ac5da22c30d6db25de6dcbff9607d8a9cd870 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 1 May 2020 10:58:27 +0900 Subject: [PATCH] [pty] do not check openpty twice if found in util library --- ext/pty/extconf.rb | 4 ++-- 1 file 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")