freebsd-ports/sysutils/screen/files/patch-configure.ac
Cy Schubert 9bdc788616 sysutils/screen: Update to 4.9.0
Update screen to 4.9.0. From the release announcement:

New in this release:
  * Hardstatus option for used encoding (escape string '%e')
  * Fixes:
    - fix combining char handling that could lead to a segfault
    - CVE-2021-26937: possible denial of service via a crafted UTF-8
      character sequence (bug #60030)
    - make screen exit code be 0 when checking --help
    - session names limit is 80 symbols (bug #61534)
    - option -X ignores specified user in multiuser env (bug #37437)
    - a lot of reformations/fixes/cleanups (man page and source code)

For full list of changes see
https://git.savannah.gnu.org/cgit/screen.git/log/?h=v.4.9.0

Note that CVE-2021-26937 was fixed in the FreeBSD port in 2021.
2022-03-17 16:44:10 -07:00

50 lines
1.5 KiB
Text

--- configure.ac.orig 2022-01-28 06:06:02.670611602 -0800
+++ configure.ac 2022-03-17 10:09:55.599298000 -0700
@@ -811,11 +811,11 @@
dnl
dnl **** utmp handling ****
dnl
-AC_CHECKING(getutent)
+AC_CHECKING(getutxent)
AC_TRY_LINK([
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if (defined(SVR4) && !defined(DGUX)) || defined(__FreeBSD__)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -825,14 +825,14 @@
#define pututline _pututline
#endif
],
-[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT),
+[int x = DEAD_PROCESS; pututxline((struct utmp *)0); getutxent();], AC_DEFINE(GETUTENT),
olibs="$LIBS"
LIBS="$LIBS -lgen"
-AC_CHECKING(getutent with -lgen)
+AC_CHECKING(getutxent with -lgen)
AC_TRY_LINK([
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -842,13 +842,13 @@
#define pututline _pututline
#endif
],
-[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
+[int x = DEAD_PROCESS; pututxline((struct utmp *)0); getutxent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
)
AC_CHECKING(ut_host)
AC_TRY_COMPILE([
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__)
#include <utmpx.h>
#define utmp utmpx
#else