buildroot/package/pppd/0003-Add-OPENSSL_INCLUDE_DIR.patch
Fabrice Fontaine 541021ec24 pppd: fix build with glibc 2.28
Since glibc 2.28
(https://savannah.gnu.org/forum/forum.php?forum_id=9205), the obsolete
functions encrypt, encrypt_r, setkey, setkey_r, cbc_crypt, ecb_crypt,
and des_setparity are no longer available to newly linked binaries, and
the headers <rpc/des_crypt.h> and <rpc/rpc_des.h> are no longer
installed. These functions encrypted and decrypted data with the DES
block cipher, which is no longer considered secure. Software that still
uses these functions should switch to a modern cryptography library,
such as libgcrypt.

So retrieve an upstream patch to use openssl instead of these functions
and a new patch to remove the unsafe header/library path
'-I/usr/include/openssl'

Fixes:
 - http://autobuild.buildroot.org/results/c13ca8b8afa8de700caf8cd2fa1812b8552b3f4a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-11-01 14:23:29 +01:00

39 lines
1 KiB
Diff

From 24dd10608bfb554390c17f709a5afa30060c994b Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Wed, 31 Oct 2018 10:49:16 +0100
Subject: [PATCH] Add OPENSSL_INCLUDE_DIR
Add OPENSSL_INCLUDE_DIR to be able to override openssl include directory
as -I/usr/include/openssl can't be used when cross-compiling
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/paulusmack/ppp/pull/107]
---
pppd/Makefile.linux | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
index 8d5ce99..b258d86 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -84,6 +84,7 @@ USE_LIBUTIL=y
MAXOCTETS=y
INCLUDE_DIRS= -I../include
+OPENSSL_INCLUDE_DIR= /usr/include/openssl
COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
@@ -137,7 +138,7 @@ endif
ifdef NEEDDES
ifndef USE_CRYPT
-CFLAGS += -I/usr/include/openssl
+CFLAGS += -I$(OPENSSL_INCLUDE_DIR)
LIBS += -lcrypto
else
CFLAGS += -DUSE_CRYPT=1
--
2.17.1