]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Create replacement sys/time.h if needed.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 5 Sep 2025 07:44:07 +0000 (17:44 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 5 Sep 2025 07:48:22 +0000 (17:48 +1000)
Remove #ifdef HAVE_SYS_TIME_H wrapper.  ok djm@

18 files changed:
channels.c
clientloop.c
configure.ac
loginrec.c
openbsd-compat/bsd-misc.c
packet.c
scp.c
serverloop.c
sftp-client.c
sftp-server.c
ssh-agent.c
ssh-keyscan.c
ssh-pkcs11-client.c
ssh-pkcs11-helper.c
ssh-pkcs11.c
sshconnect.c
sshd-session.c
sshd.c

index b489cb9a9c9a8767792d9d5f096cea45f622c6e2..2a4cb0e3134bdfc2c46d76291cbfe1ae75a0b70b 100644 (file)
@@ -46,9 +46,7 @@
 #include <sys/ioctl.h>
 #include <sys/un.h>
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
index 4511ecf102bc7cc4ec106d3c274d971ac48a33ef..cf51897d6651fef68549a6c2e49d8fb14f3c543d 100644 (file)
@@ -66,9 +66,7 @@
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include <sys/socket.h>
 
 #include <ctype.h>
index 6f48e55080261a2e6779ec1a1d08b836aa164d70..4c2a2b7ec1316c754ccf909b819265c78b5b0b96 100644 (file)
@@ -510,7 +510,6 @@ AC_CHECK_HEADERS([ \
        sys/strtio.h \
        sys/statvfs.h \
        sys/sysmacros.h \
-       sys/time.h \
        sys/timers.h \
        sys/vfs.h \
        time.h \
@@ -531,15 +530,17 @@ 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([ifaddrs.h paths.h poll.h stdint.h util.h], [], [
+AC_CHECK_HEADERS([ifaddrs.h paths.h poll.h stdint.h sys/time.h util.h], [], [
     compatincludes="`pwd`/openbsd-compat/include"
-    mkdir -p "$compatincludes"
+    header="$compatincludes/$ac_header"
+    dir=`dirname "$header"`
+    mkdir -p "$dir"
     case "$ac_header" in
     poll.h) echo '#ifdef HAVE_SYS_POLL_H'
             echo '#include <sys/poll.h>'
             echo '#endif' ;;
     *)      ;;
-    esac >"$compatincludes/$ac_header"
+    esac >"$header"
 ])
 if test "$compatincludes" != "no"; then
     CPPFLAGS="$CPPFLAGS -I$compatincludes"
index e50964de36011d2e2b7bb855291de8856a75000c..7d1c9dd43de9258da8cef357bbf0bb17e39d98f6 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <netinet/in.h>
 
index 669d2bb7e2734a80297a22497d3ba10f41889c71..aea2ba67f07de38e9e66e1ebd994d32f2a3a03db 100644 (file)
@@ -21,9 +21,7 @@
 #ifdef HAVE_SYS_SELECT_H
 # include <sys/select.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <fcntl.h>
 #include <string.h>
index 6af84ed85d1ecebd0ea0a69549ad3b3dce429c85..be16fd42988d1c1e8e268868514bb9a6ee178bdf 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -42,9 +42,7 @@
 #include <sys/types.h>
 #include "openbsd-compat/sys-queue.h"
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <netinet/in.h>
 #include <netinet/ip.h>
diff --git a/scp.c b/scp.c
index be0acc3f5bd7c99852d2b37ca4bb378a2886f759..f44470d763a72245361755afd4866c9021bb5580 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -78,9 +78,7 @@
 # include <sys/stat.h>
 #endif
 #include <poll.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include <sys/wait.h>
 #include <sys/uio.h>
 
index ff207721d90d70eabb2797408379af3c2777a47e..c8b1fd6db73832a4baf31dcac980680caf908f31 100644 (file)
@@ -40,9 +40,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <netinet/in.h>
 
index 880064c1e1efd185fdf2ec4cfe6ec83676613a9b..6ff0db7f99016ae577df82209034b3924d3c23f1 100644 (file)
@@ -30,9 +30,7 @@
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include <sys/uio.h>
 
 #include <dirent.h>
index 0d14521029ca060c2cb2781564418ca1cd81c03b..777821acd521d79e091af699296d854135c5771d 100644 (file)
@@ -20,9 +20,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/resource.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
index 10b19296c20f076979d91cb5f220d37db641e594..36243f1989cd0951dd33a26d713aa05a9d505a41 100644 (file)
@@ -41,9 +41,7 @@
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #ifdef HAVE_SYS_UN_H
 # include <sys/un.h>
 #endif
index 46208f117f0c00332f20a74deb5b96d2c1e7a6a5..28451fc5992954d355212730e3bcfe765f3b9ede 100644 (file)
@@ -12,9 +12,7 @@
 #include <sys/types.h>
 #include "openbsd-compat/sys-queue.h"
 #include <sys/resource.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
index 8be0d8aecff040f6f6a158df4baccecd2d50fb8a..85afb62ac6f441c58f27291df6119fdf4f873f05 100644 (file)
@@ -19,9 +19,7 @@
 #include "includes.h"
 
 #include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include <sys/socket.h>
 
 #include <stdarg.h>
index 279cd1df1e2457e11e123afb81f81c45f48ed79e..7ed4bdb768413572c35e7adb1e3fce7b1bfaafb7 100644 (file)
@@ -18,9 +18,7 @@
 #include "includes.h"
 
 #include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <stdlib.h>
 #include <errno.h>
index b2d3cbd80f5d71c697df4e631a6a437784235609..5167f89b8115b1ff3a97a876c51231eaa33eb195 100644 (file)
@@ -20,9 +20,7 @@
 
 #ifdef ENABLE_PKCS11
 
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <sys/types.h>
 #include <stdarg.h>
index 97f65edc7e4a52d27200f1fd91e4cf557dae9a0f..bef9f9bc3f0ea96a9abf62925b0323fece05c731 100644 (file)
@@ -19,9 +19,7 @@
 #include <sys/wait.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 
 #include <net/if.h>
 #include <netinet/in.h>
index cd23c053067874344c80b4aaf7cdfb32c5a2f58a..b737e5911749a5f8ddac089c7334ca25a0bf0d63 100644 (file)
@@ -35,9 +35,7 @@
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include "openbsd-compat/sys-tree.h"
 #include "openbsd-compat/sys-queue.h"
 #include <sys/wait.h>
diff --git a/sshd.c b/sshd.c
index 23ca4e4fbd00af6a3397710c56c2bde91ccd8071..87601740b17fcfa8c2b65ff6750df66b297c185c 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -32,9 +32,7 @@
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
+#include <sys/time.h>
 #include "openbsd-compat/sys-tree.h"
 #include "openbsd-compat/sys-queue.h"
 #include <sys/wait.h>