From: Darren Tucker Date: Fri, 5 Sep 2025 07:50:18 +0000 (+1000) Subject: Create replacement sys/stat.h if needed. X-Git-Tag: V_10_1_P1~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea586edbcbec7089f768ed682a79a399eaa1e5b1;p=thirdparty%2Fopenssh-portable.git Create replacement sys/stat.h if needed. Remove #ifdef HAVE_SYS_STAT_H wrapper. ok djm@ --- diff --git a/clientloop.c b/clientloop.c index cf51897d6..cc6f64a2b 100644 --- a/clientloop.c +++ b/clientloop.c @@ -63,9 +63,7 @@ #include #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include diff --git a/configure.ac b/configure.ac index 4c2a2b7ec..05a302e12 100644 --- a/configure.ac +++ b/configure.ac @@ -530,7 +530,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([ifaddrs.h paths.h poll.h stdint.h sys/time.h util.h], [], [ +AC_CHECK_HEADERS([ifaddrs.h paths.h poll.h stdint.h sys/stat.h sys/time.h util.h], [], [ compatincludes="`pwd`/openbsd-compat/include" header="$compatincludes/$ac_header" dir=`dirname "$header"` diff --git a/openbsd-compat/bsd-openpty.c b/openbsd-compat/bsd-openpty.c index 3e58ace26..f08d6156d 100644 --- a/openbsd-compat/bsd-openpty.c +++ b/openbsd-compat/bsd-openpty.c @@ -39,9 +39,7 @@ #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #ifdef HAVE_SYS_IOCTL_H # include #endif diff --git a/openbsd-compat/daemon.c b/openbsd-compat/daemon.c index 3efe14c68..256466959 100644 --- a/openbsd-compat/daemon.c +++ b/openbsd-compat/daemon.c @@ -36,9 +36,7 @@ #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #ifdef HAVE_FCNTL_H # include diff --git a/scp.c b/scp.c index f44470d76..3d045bc6b 100644 --- a/scp.c +++ b/scp.c @@ -74,9 +74,7 @@ #include "includes.h" #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include #include diff --git a/session.c b/session.c index 6d1656428..e78c85cfd 100644 --- a/session.c +++ b/session.c @@ -36,9 +36,7 @@ #include "includes.h" #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include #include diff --git a/sftp-client.c b/sftp-client.c index 6ff0db7f9..0702abd5e 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -27,9 +27,7 @@ #include #endif #include "openbsd-compat/sys-queue.h" -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include diff --git a/sftp-glob.c b/sftp-glob.c index 1b82759b0..e054e75e8 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -18,9 +18,7 @@ #include "includes.h" #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include diff --git a/sftp.c b/sftp.c index 9cb654a0e..5d6d782f4 100644 --- a/sftp.c +++ b/sftp.c @@ -19,9 +19,7 @@ #include #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include #ifdef HAVE_SYS_STATVFS_H diff --git a/ssh.c b/ssh.c index 93dbd2e5e..58cfedf6d 100644 --- a/ssh.c +++ b/ssh.c @@ -43,9 +43,7 @@ #include "includes.h" #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include #include diff --git a/sshd-session.c b/sshd-session.c index b737e5911..7abc2b4a5 100644 --- a/sshd-session.c +++ b/sshd-session.c @@ -32,9 +32,7 @@ #include #include #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include "openbsd-compat/sys-tree.h" #include "openbsd-compat/sys-queue.h" diff --git a/sshd.c b/sshd.c index 87601740b..3c76b60b0 100644 --- a/sshd.c +++ b/sshd.c @@ -29,9 +29,7 @@ #include #include #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #include #include "openbsd-compat/sys-tree.h" #include "openbsd-compat/sys-queue.h"