[openssh-commits] [openssh] 05/05: Pass new "compat includes" path via AC_SUBST.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Oct 1 15:47:09 AEST 2025


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

dtucker pushed a commit to branch master
in repository openssh.

commit 047e0221eaf9815775e8ea78c6d6add5ab0f68c7
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Wed Oct 1 14:34:02 2025 +1000

    Pass new "compat includes" path via AC_SUBST.
    
    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  |  3 ++-
 configure.ac | 10 ++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 769ec17f4..760fbaa5b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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@
diff --git a/configure.ac b/configure.ac
index 819e83689..3eb6d4697 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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

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


More information about the openssh-commits mailing list