From: Kurt Van Dijck Date: Thu, 26 Sep 2019 07:21:05 +0000 (+0200) Subject: make: Avoid using host include for cross-compiling X-Git-Tag: ppp-2.4.8~18 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=4e713175eae56cb863b39bc19d377f95a35823a8 make: Avoid using host include for cross-compiling Prepend include paths with the toolchain's sysroot directory. In case of a non-sysroot-aware toolchain, this does not help, but does not break either. Signed-off-by: Kurt Van Dijck Signed-off-by: Paul Mackerras --- diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux index 8d5ce99..12a986e 100644 --- a/pppd/Makefile.linux +++ b/pppd/Makefile.linux @@ -125,7 +125,7 @@ CFLAGS += -DHAS_SHADOW #LIBS += -lshadow $(LIBS) endif -ifneq ($(wildcard /usr/include/crypt.h),) +ifneq ($(wildcard $(shell $CC --print-sysroot)/usr/include/crypt.h),) CFLAGS += -DHAVE_CRYPT_H=1 LIBS += -lcrypt endif @@ -137,7 +137,7 @@ endif ifdef NEEDDES ifndef USE_CRYPT -CFLAGS += -I/usr/include/openssl +CFLAGS += -I$(shell $CC --print-sysroot)/usr/include/openssl LIBS += -lcrypto else CFLAGS += -DUSE_CRYPT=1