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.
This commit is contained in:
Adam Sampson 2020-08-23 17:15:06 +01:00
parent 29bb3d5a5a
commit 413190d12f
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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)