Skip to content

Commit

Permalink
sysutils/screen: Ignore legacy pty (pty.ko) during build
Browse files Browse the repository at this point in the history
screen built on a machine with pty.ko (legacy SYSVR4 pty support)
loaded will fail to run on machines without pty.ko loaded. It will
try to open /dev/ptmx and fail, crashing screen. This commit fixes
this by removing the test for /dev/ptmx (legacy SYSVR4 pty support).

Reported by:	Jonathan Chen <jonc@chen.org.nz>
  • Loading branch information
cschuber committed Jan 3, 2024
1 parent 393b392 commit 8659dcf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions sysutils/screen/Makefile
@@ -1,5 +1,6 @@
PORTNAME= screen
PORTVERSION= 4.9.1
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= GNU \
ftp://ftp.gnu.org/gnu/screen/ \
Expand Down
28 changes: 24 additions & 4 deletions sysutils/screen/files/patch-configure.ac
@@ -1,5 +1,5 @@
--- configure.ac.orig 2023-08-15 17:29:26.000000000 -0700
+++ configure.ac 2023-08-19 07:32:42.246552000 -0700
+++ configure.ac 2024-01-02 18:30:11.205776000 -0800
@@ -669,7 +669,7 @@
tgetent((char *)0, (char *)0);
],,
Expand All @@ -9,7 +9,27 @@
AC_CHECKING(libcurses)
AC_TRY_LINK([
#include <curses.h>
@@ -900,11 +900,11 @@
@@ -756,19 +756,6 @@
fi
fi

-if test "$cross_compiling" = no ; then
-AC_CHECKING(for SVR4 ptys)
-sysvr4ptys=
-if test -c /dev/ptmx ; then
-AC_TRY_LINK([
- #include <stdlib.h>
-], [
- ptsname(0);grantpt(0);unlockpt(0);
-],[AC_DEFINE(HAVE_SVR4_PTYS)
-sysvr4ptys=1])
-fi
-fi
-
AC_CHECK_FUNCS(getpt)

dnl check for openpty()
@@ -900,11 +887,11 @@
dnl
dnl **** utmp handling ****
dnl
Expand All @@ -23,7 +43,7 @@
#include <utmpx.h>
#define utmp utmpx
#else
@@ -917,11 +917,11 @@
@@ -917,11 +904,11 @@
[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT),
olibs="$LIBS"
LIBS="$LIBS -lgen"
Expand All @@ -37,7 +57,7 @@
#include <utmpx.h>
#define utmp utmpx
#else
@@ -931,13 +931,13 @@
@@ -931,13 +918,13 @@
#define pututline _pututline
#endif
],
Expand Down

0 comments on commit 8659dcf

Please sign in to comment.