]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Factor out COMPATINCLUDES into its own variable.
authorDarren Tucker <dtucker@dtucker.net>
Mon, 9 Feb 2026 20:22:30 +0000 (07:22 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 10 Feb 2026 02:17:29 +0000 (13:17 +1100)
configure.ac

index 42dffd154516f21a98391cc849f39678e5b2b33e..b6c551dae768ffc624aa752e8f4afbc9ea8c3d51 100644 (file)
@@ -525,6 +525,7 @@ AC_CHECK_HEADERS([ \
 # platform.  Usually these are just empty, but in some cases they'll include
 # 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.
+COMPATINCLUDESDIR="openbsd-compat/include"
 COMPATINCLUDES=""
 AC_CHECK_HEADERS([ \
     endian.h \
@@ -543,7 +544,7 @@ AC_CHECK_HEADERS([ \
     sys/un.h \
     time.h \
     util.h], [], [
-       COMPATINCLUDES="openbsd-compat/include"
+       COMPATINCLUDES="$COMPATINCLUDESDIR"
        header="$COMPATINCLUDES/$ac_header"
        dir=`dirname "$header"`
        mkdir -p "$dir"
@@ -557,7 +558,7 @@ AC_CHECK_HEADERS([ \
 
 dnl Now create replacement headers for those that we always want to shim.
 for include in sys/queue.h sys/tree.h; do
-       COMPATINCLUDES="openbsd-compat/include"
+       COMPATINCLUDES="$COMPATINCLUDESDIR"
        header="$COMPATINCLUDES/$include"
        dir=`dirname "$header"`
        mkdir -p "$dir"
@@ -575,11 +576,12 @@ done
 # need to include the system one first, not our shim.
 case "$host" in
 *-*-dragonfly*)
-       mkdir -p openbsd-compat/include/sys
+       COMPATINCLUDES="$COMPATINCLUDESDIR"
+       mkdir -p "$COMPATINCLUDES/sys"
        echo '#include "/usr/include/sys/queue.h"'
        echo '#include "/usr/include/sys/mount.h"'
        ;;
-esac > "openbsd-compat/include/sys/mount.h"
+esac > "$COMPATINCLUDES/sys/mount.h"
 
 AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [
 #ifdef HAVE_SYS_TYPES_H