From 24d80561dc54f67053a35b7c6a5c414f727e64d8 Mon Sep 17 00:00:00 2001 From: 10ne1 Date: Mon, 15 Mar 2021 01:11:35 +0200 Subject: [PATCH] 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 --- pppd/Makefile.linux | 1 - pppd/pppcrypt.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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 *); -- 2.39.2