From: Darren Tucker Date: Wed, 23 Nov 2022 02:09:11 +0000 (+1100) Subject: If we haven't found it yet, recheck for sys/stat.h. X-Git-Tag: V_9_2_P1~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b9bbbfe8b26db6e9a30a7e08c223e85421aed98;p=thirdparty%2Fopenssh-portable.git 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. --- diff --git a/configure.ac b/configure.ac index e172540a1..d1998c94d 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 \