[openssh-commits] [openssh] 01/02: If we haven't found it yet, recheck for sys/stat.h.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Nov 23 13:27:58 AEDT 2022


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 6b9bbbfe8b26db6e9a30a7e08c223e85421aed98
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Wed Nov 23 13:09:11 2022 +1100

    If we haven't found it yet, recheck for sys/stat.h.
    
    On some very old platforms, sys/stat.h needs sys/types.h, however
    autoconf 2.71's AC_CHECK_INCLUDES_DEFAULT checks for them in the
    opposite order, which in combination with modern autoconf's
    "present but cannot be compiled" behaviour causes it to not be
    detected.
---
 configure.ac | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e172540a..d1998c94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,6 +417,14 @@ AC_ARG_WITH([Werror],
 	]
 )
 
+dnl On some old platforms, sys/stat.h requires sys/types.h, but autoconf-2.71's
+dnl AC_CHECK_INCLUDES_DEFAULT checks for them in the opposite order.  If we
+dnl haven't detected it, recheck.
+if test "x$ac_cv_header_sys_stat_h" != "xyes"; then
+	unset ac_cv_header_sys_stat_h
+	AC_CHECK_HEADERS([sys/stat.h])
+fi
+
 AC_CHECK_HEADERS([ \
 	blf.h \
 	bstring.h \
@@ -475,7 +483,6 @@ AC_CHECK_HEADERS([ \
 	sys/ptrace.h \
 	sys/random.h \
 	sys/select.h \
-	sys/stat.h \
 	sys/stream.h \
 	sys/stropts.h \
 	sys/strtio.h \

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list