From 413190d12f62be11b34f5ebd79efdef3693114cf Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sun, 23 Aug 2020 17:15:06 +0100 Subject: [PATCH] Use openpty if possible. The code this affects in sshpty.c originally came from OpenSSH, which now uses openpty by preference when it's available. openpty is a BSD-ism, but it's been provided by glibc on Linux with the BSD semantics since 1998. --- BasiliskII/src/Unix/configure.ac | 3 ++- SheepShaver/src/Unix/configure.ac | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index e8ad4e1e..b405b2ce 100644 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -601,7 +601,8 @@ dnl Check for headers and functions related to pty support (sshpty.c) dnl From openssh-3.2.2p1 configure.ac AC_CHECK_HEADERS(strings.h login.h sys/bsdtty.h sys/stat.h util.h pty.h) -AC_CHECK_FUNCS(_getpty vhangup strlcpy) +AC_SEARCH_LIBS([openpty], [util bsd]) +AC_CHECK_FUNCS(_getpty openpty vhangup strlcpy) case "$host" in *-*-hpux10.26) diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac index 006fe872..33fce9c0 100644 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -461,7 +461,8 @@ esac dnl Check for headers and functions related to pty support (sshpty.c) dnl From openssh-3.2.2p1 configure.ac AC_CHECK_HEADERS(strings.h login.h sys/bsdtty.h sys/stat.h util.h pty.h) -AC_CHECK_FUNCS(_getpty vhangup strlcpy) +AC_SEARCH_LIBS([openpty], [util bsd]) +AC_CHECK_FUNCS(_getpty openpty vhangup strlcpy) case "$host" in *-*-hpux10.26)