From: Samuel Thibault Date: Thu, 31 Dec 2020 05:35:24 +0000 (+0100) Subject: pppd: Use a compile test to detect crypt.h (#198) X-Git-Tag: ppp-2.4.9~20 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=f1e3aa2dc7e7772d8491c6ff61e4e6d28af33d4b pppd: Use a compile test to detect crypt.h (#198) ppp checks header for existence of crypt.h looking it up in /usr/include. That's incompatible with non-glibcs or a glibc with multiarch headers (https://bugs.debian.org/798955). This patch replaces the file existence test with a compile test. Reviewed-by: Chris Boot Signed-off-by: Samuel Thibault Co-authored-by: Helmut Grohne --- diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux index a971ff3..a6348eb 100644 --- a/pppd/Makefile.linux +++ b/pppd/Makefile.linux @@ -140,7 +140,7 @@ CFLAGS += -DHAS_SHADOW #LIBS += -lshadow $(LIBS) endif -ifneq ($(wildcard $(shell $(CC) --print-sysroot)/usr/include/crypt.h),) +ifeq ($(shell echo '\#include ' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes) CFLAGS += -DHAVE_CRYPT_H=1 LIBS += -lcrypt endif