]> git.ozlabs.org Git - ppp.git/commitdiff
pppd: Fix cross-compilation using Clang (#253)
author10ne1 <adi@adirat.com>
Sun, 14 Mar 2021 23:11:35 +0000 (01:11 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Mar 2021 23:11:35 +0000 (10:11 +1100)
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 <adrian.ratiu@collabora.com>
pppd/Makefile.linux
pppd/pppcrypt.h

index c3489fb5dbf06673ad849ee6a62eb3d1982892ac..d04752d5f3232163e59e70e78a21714bec8b5765 100644 (file)
@@ -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
index 364940e39f79e269cc169aada4b8b167b10dd3b1..0f71bb357b9ad9d78b483fb1d53160f4dbd06ad9 100644 (file)
@@ -38,7 +38,7 @@
 #endif
 
 #ifndef USE_CRYPT
-#include <des.h>
+#include <openssl/des.h>
 #endif
 
 extern bool    DesSetkey(u_char *);