Skip to content

Commit

Permalink
make: Avoid using host include for cross-compiling
Browse files Browse the repository at this point in the history
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 <dev.kurt@vandijck-laurijssen.be>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
  • Loading branch information
kurt-vd authored and paulusmack committed Oct 1, 2019
1 parent 3202f89 commit 4e71317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pppd/Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4e71317

Please sign in to comment.