]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Pass new "compat includes" path via AC_SUBST.
authorDarren Tucker <dtucker@dtucker.net>
Wed, 1 Oct 2025 04:34:02 +0000 (14:34 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 1 Oct 2025 04:34:02 +0000 (14:34 +1000)
This fixes the build when the directory path containing a space.
Found by Sevan Janiyan, tested by Job Snijders.  This doesn't fix
"make tests", however that is a different, pre-existing problem
that needs to be addressed separately.

Makefile.in
configure.ac

index 769ec17f426bfc1388929afa6a16fb568cbe56fa..760fbaa5b997d98094532d5a9c87519e5e6db1b6 100644 (file)
@@ -33,6 +33,7 @@ STRIP_OPT=@STRIP_OPT@
 TEST_SHELL=@TEST_SHELL@
 BUILDDIR=@abs_top_builddir@
 SK_STANDALONE=@SK_STANDALONE@
+COMPATINCLUDES="$(BUILDDIR)/@COMPATINCLUDES@"
 
 PATHS= -DSSHDIR=\"$(sysconfdir)\" \
        -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
@@ -50,7 +51,7 @@ CC=@CC@
 LD=@LD@
 CFLAGS=@CFLAGS@
 CFLAGS_NOPIE=@CFLAGS_NOPIE@
-CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
+CPPFLAGS=-I. -I$(srcdir) -I$(COMPATINCLUDES) @CPPFLAGS@ $(PATHS) @DEFS@
 PICFLAG=@PICFLAG@
 LIBS=@LIBS@
 CHANNELLIBS=@CHANNELLIBS@
index 819e8368949befa75ae669ee15e9aae2ab04787a..3eb6d4697f98a786925e3dcf29f418478082f430 100644 (file)
@@ -526,7 +526,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.
-compatincludes=no
+COMPATINCLUDES=""
 AC_CHECK_HEADERS([ \
     endian.h \
     ifaddrs.h \
@@ -541,8 +541,8 @@ AC_CHECK_HEADERS([ \
     sys/un.h \
     time.h \
     util.h], [], [
-       compatincludes="`pwd`/openbsd-compat/include"
-       header="$compatincludes/$ac_header"
+       COMPATINCLUDES="openbsd-compat/include"
+       header="$COMPATINCLUDES/$ac_header"
        dir=`dirname "$header"`
        mkdir -p "$dir"
        case "$ac_header" in
@@ -552,9 +552,7 @@ AC_CHECK_HEADERS([ \
        *)      ;;
        esac >"$header"
 ])
-if test "$compatincludes" != "no"; then
-    CPPFLAGS="$CPPFLAGS -I$compatincludes"
-fi
+AC_SUBST([COMPATINCLUDES])
 
 AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [
 #ifdef HAVE_SYS_TYPES_H