From c8f55e4d9fc0c70ca674400a37076f42bfcef152 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 18 Feb 2020 10:52:00 +0100
Subject: [PATCH] Build [Linux]: openpty(3BSD) may be hidden in libutil.

---
 src/configure.in                | 2 ++
 src/modules/_Stdio/configure.in | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/configure.in b/src/configure.in
index 09b0e5379d..4d2b73aae7 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -3690,6 +3690,8 @@ AC_CHECK_LIB(m, floor)
 
 AC_CHECK_LIB(socket, socket)
 
+AC_CHECK_LIB(util, openpty)
+
 if test x"$pike_cv_sys_os" = xWindows_NT ; then
   AC_MSG_CHECKING(if we should use the 64 bit API)
   AC_CACHE_VAL(pike_cv_sys_win64, [
diff --git a/src/modules/_Stdio/configure.in b/src/modules/_Stdio/configure.in
index 618a3358de..f440e9ff78 100644
--- a/src/modules/_Stdio/configure.in
+++ b/src/modules/_Stdio/configure.in
@@ -63,6 +63,8 @@ AC_CHECK_LIB(nsl, gethostbyname)
 AC_CHECK_LIB(net, __get_socket_descriptor)
 dnl AC_CHECK_LIB(zfs, libzfs_init)
 
+AC_CHECK_LIB(util, openpty)
+
 AC_HAVE_FUNCS(readdir_r statvfs statfs ustat lseek64 lstat fsync \
  grantpt unlockpt ptsname posix_openpt socketpair writev sendfile munmap \
  openpty \
-- 
GitLab