[openssh-commits] [openssh] 04/11: Create replacement util.h if needed.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Sep 5 18:10:24 AEST 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 53887d8ebc583b51e996cb2bdeb11e054d36343b
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Fri Sep 5 17:27:43 2025 +1000
Create replacement util.h if needed.
Remove #ifdef HAVE_UTIL_H wrapper. ok djm@
---
configure.ac | 3 +--
loginrec.c | 2 --
mux.c | 4 +---
openbsd-compat/bsd-openpty.c | 4 +---
readconf.c | 2 --
scp.c | 4 +---
servconf.c | 2 --
sftp-common.c | 2 --
sftp.c | 4 +---
ssh-agent.c | 4 +---
sshkey.c | 2 --
sshpty.c | 4 +---
12 files changed, 7 insertions(+), 30 deletions(-)
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 <util.h>
-#endif
#ifdef USE_WTMPDB
# include <wtmpdb.h>
diff --git a/mux.c b/mux.c
index 8ff29ee2a..6b1d463af 100644
--- a/mux.c
+++ b/mux.c
@@ -38,9 +38,7 @@
#include <poll.h>
-#ifdef HAVE_UTIL_H
-# include <util.h>
-#endif
+#include <util.h>
#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 <fcntl.h>
#endif
-#ifdef HAVE_UTIL_H
-# include <util.h>
-#endif /* HAVE_UTIL_H */
+#include <util.h>
#ifdef HAVE_PTY_H
# include <pty.h>
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 <util.h>
-#endif
#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) && !defined(BROKEN_STRNVIS)
# include <vis.h>
#endif
diff --git a/scp.c b/scp.c
index 67bd9d28d..be0acc3f5 100644
--- a/scp.c
+++ b/scp.c
@@ -100,9 +100,7 @@
#include <libgen.h>
#endif
#include <limits.h>
-#ifdef HAVE_UTIL_H
-# include <util.h>
-#endif
+#include <util.h>
#include <locale.h>
#include <pwd.h>
#include <signal.h>
diff --git a/servconf.c b/servconf.c
index bd04336e0..532c09553 100644
--- a/servconf.c
+++ b/servconf.c
@@ -37,9 +37,7 @@
#include <limits.h>
#include <stdarg.h>
#include <errno.h>
-#ifdef HAVE_UTIL_H
#include <util.h>
-#endif
#ifdef USE_SYSTEM_GLOB
# include <glob.h>
#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 <time.h>
#include <stdarg.h>
#include <unistd.h>
-#ifdef HAVE_UTIL_H
#include <util.h>
-#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 <string.h>
#include <unistd.h>
-#ifdef HAVE_UTIL_H
-# include <util.h>
-#endif
+#include <util.h>
#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 <time.h>
#include <string.h>
#include <unistd.h>
-#ifdef HAVE_UTIL_H
-# include <util.h>
-#endif
+#include <util.h>
#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 <string.h>
#include <resolv.h>
#include <time.h>
-#ifdef HAVE_UTIL_H
#include <util.h>
-#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 <stdio.h>
#include <string.h>
#include <termios.h>
-#ifdef HAVE_UTIL_H
-# include <util.h>
-#endif
+#include <util.h>
#include <unistd.h>
#include "sshpty.h"
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list