summaryrefslogtreecommitdiff
path: root/system/openssh/utmp-header-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/openssh/utmp-header-check.patch')
-rw-r--r--system/openssh/utmp-header-check.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/system/openssh/utmp-header-check.patch b/system/openssh/utmp-header-check.patch
new file mode 100644
index 000000000..523466684
--- /dev/null
+++ b/system/openssh/utmp-header-check.patch
@@ -0,0 +1,59 @@
+Ensure that <utmp.h> is only included when present and available.
+
+--- openssh-9.4p1/configure.ac.old 2023-08-09 20:10:22.000000000 -0500
++++ openssh-9.4p1/configure.ac 2024-12-07 23:51:42.425820273 -0600
+@@ -5351,7 +5351,9 @@
+ AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+-#include <utmp.h>
++#ifdef HAVE_UTMP_H
++# include <utmp.h>
++#endif
+ #ifdef HAVE_LASTLOG_H
+ # include <lastlog.h>
+ #endif
+@@ -5368,7 +5370,9 @@
+ AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+-#include <utmp.h>
++#ifdef HAVE_UTMP_H
++# include <utmp.h>
++#endif
+ #ifdef HAVE_LASTLOG_H
+ # include <lastlog.h>
+ #endif
+@@ -5406,7 +5410,9 @@
+ AC_MSG_CHECKING([if your system defines UTMP_FILE])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+-#include <utmp.h>
++#ifdef HAVE_UTMP_H
++# include <utmp.h>
++#endif
+ #ifdef HAVE_PATHS_H
+ # include <paths.h>
+ #endif
+@@ -5436,7 +5442,9 @@
+ AC_MSG_CHECKING([if your system defines WTMP_FILE])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+-#include <utmp.h>
++#ifdef HAVE_UTMP_H
++# include <utmp.h>
++#endif
+ #ifdef HAVE_PATHS_H
+ # include <paths.h>
+ #endif
+@@ -5466,7 +5474,9 @@
+ AC_MSG_CHECKING([if your system defines WTMPX_FILE])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+-#include <utmp.h>
++#ifdef HAVE_UTMP_H
++# include <utmp.h>
++#endif
+ #ifdef HAVE_UTMPX_H
+ #include <utmpx.h>
+ #endif