From: Darren Tucker Date: Fri, 5 Sep 2025 07:27:43 +0000 (+1000) Subject: Create replacement util.h if needed. X-Git-Tag: V_10_1_P1~116 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53887d8ebc583b51e996cb2bdeb11e054d36343b;p=thirdparty%2Fopenssh-portable.git Create replacement util.h if needed. Remove #ifdef HAVE_UTIL_H wrapper. ok djm@ --- diff --git a/configure.ac b/configure.ac index 44023c330..417985751 100644 --- a/configure.ac +++ b/configure.ac @@ -520,7 +520,6 @@ AC_CHECK_HEADERS([ \ ucred.h \ unistd.h \ usersec.h \ - util.h \ utime.h \ utmp.h \ utmpx.h \ @@ -533,7 +532,7 @@ AC_CHECK_HEADERS([ \ # the equivalent file. This avoids having to wrap those includes in # '#ifdef HAVE_FOO_H'. If we create any such headers, add the path to includes. compatincludes=no -AC_CHECK_HEADERS([paths.h poll.h stdint.h], [], [ +AC_CHECK_HEADERS([paths.h poll.h stdint.h util.h], [], [ compatincludes="`pwd`/openbsd-compat/include" mkdir -p "$compatincludes" case "$ac_header" in diff --git a/loginrec.c b/loginrec.c index fa829fdf4..e50964de3 100644 --- a/loginrec.c +++ b/loginrec.c @@ -160,9 +160,7 @@ #include "ssherr.h" #include "misc.h" -#ifdef HAVE_UTIL_H # include -#endif #ifdef USE_WTMPDB # include diff --git a/mux.c b/mux.c index 8ff29ee2a..6b1d463af 100644 --- a/mux.c +++ b/mux.c @@ -38,9 +38,7 @@ #include -#ifdef HAVE_UTIL_H -# include -#endif +#include #include "openbsd-compat/sys-queue.h" #include "xmalloc.h" diff --git a/openbsd-compat/bsd-openpty.c b/openbsd-compat/bsd-openpty.c index f5507000a..3e58ace26 100644 --- a/openbsd-compat/bsd-openpty.c +++ b/openbsd-compat/bsd-openpty.c @@ -50,9 +50,7 @@ # include #endif -#ifdef HAVE_UTIL_H -# include -#endif /* HAVE_UTIL_H */ +#include #ifdef HAVE_PTY_H # include diff --git a/readconf.c b/readconf.c index bee3e21c4..0acc08ca1 100644 --- a/readconf.c +++ b/readconf.c @@ -46,9 +46,7 @@ #else # include "openbsd-compat/glob.h" #endif -#ifdef HAVE_UTIL_H #include -#endif #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS) # include #endif diff --git a/scp.c b/scp.c index 67bd9d28d..be0acc3f5 100644 --- a/scp.c +++ b/scp.c @@ -100,9 +100,7 @@ #include #endif #include -#ifdef HAVE_UTIL_H -# include -#endif +#include #include #include #include diff --git a/servconf.c b/servconf.c index bd04336e0..532c09553 100644 --- a/servconf.c +++ b/servconf.c @@ -37,9 +37,7 @@ #include #include #include -#ifdef HAVE_UTIL_H #include -#endif #ifdef USE_SYSTEM_GLOB # include #else diff --git a/sftp-common.c b/sftp-common.c index 5d7249825..4abd54a07 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -37,9 +37,7 @@ #include #include #include -#ifdef HAVE_UTIL_H #include -#endif #include "xmalloc.h" #include "ssherr.h" diff --git a/sftp.c b/sftp.c index 191b1e348..9cb654a0e 100644 --- a/sftp.c +++ b/sftp.c @@ -51,9 +51,7 @@ typedef void EditLine; #include #include -#ifdef HAVE_UTIL_H -# include -#endif +#include #include "xmalloc.h" #include "log.h" diff --git a/ssh-agent.c b/ssh-agent.c index e17d8aa9a..10b19296c 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -66,9 +66,7 @@ #include #include #include -#ifdef HAVE_UTIL_H -# include -#endif +#include #include "xmalloc.h" #include "ssh.h" diff --git a/sshkey.c b/sshkey.c index 3633c878a..ab69d474d 100644 --- a/sshkey.c +++ b/sshkey.c @@ -46,9 +46,7 @@ #include #include #include -#ifdef HAVE_UTIL_H #include -#endif /* HAVE_UTIL_H */ #include "ssh2.h" #include "ssherr.h" diff --git a/sshpty.c b/sshpty.c index fe01f3b88..968df5a63 100644 --- a/sshpty.c +++ b/sshpty.c @@ -28,9 +28,7 @@ #include #include #include -#ifdef HAVE_UTIL_H -# include -#endif +#include #include #include "sshpty.h"