From: 10ne1 Date: Sun, 14 Mar 2021 23:11:35 +0000 (+0200) Subject: pppd: Fix cross-compilation using Clang (#253) X-Git-Tag: ppp-2.5.0~84 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;ds=sidebyside;h=24d80561dc54f67053a35b7c6a5c414f727e64d8;p=ppp.git pppd: Fix cross-compilation using Clang (#253) Clang does not have the --print-sysroot option so the shell snippet silently fails leading to "-I/usr/include/openssl". Thankfully systems like Gentoo/portage or Yocto/bitbake enable sysroot poisoning precisely to catch these kinds of bugs. There is only one user of this non-standard CFLAG include in pppcrypt.h, so make it consistent with the rest of the sources (eg. see eap-tls.[h|c] openssl/* includes) and drop the fragile sysroot hackery. Signed-off-by: Adrian Ratiu --- diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux index c3489fb..d04752d 100644 --- a/pppd/Makefile.linux +++ b/pppd/Makefile.linux @@ -157,7 +157,6 @@ endif ifdef NEEDDES ifndef USE_CRYPT -CFLAGS += -I$(shell $(CC) --print-sysroot)/usr/include/openssl NEEDCRYPTOLIB = y else CFLAGS += -DUSE_CRYPT=1 diff --git a/pppd/pppcrypt.h b/pppd/pppcrypt.h index 364940e..0f71bb3 100644 --- a/pppd/pppcrypt.h +++ b/pppd/pppcrypt.h @@ -38,7 +38,7 @@ #endif #ifndef USE_CRYPT -#include +#include #endif extern bool DesSetkey(u_char *);