From cfe5ce9d4956809bca6c7ced1dbe42d6befddf83 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Thu, 9 Apr 2020 03:17:30 +0200 Subject: [PATCH] init: raise an error if PPP CCP_SUPPORT==1 but MPPE_SUPPORT==0 Building PPP CCP support without adding any compressor support serve no real use case. Forbid doing so instead of bloating the code with more ifdef. Signed-off-by: Sylvain Rochet --- src/core/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/init.c b/src/core/init.c index 928659da..0013a899 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -220,6 +220,9 @@ PACK_STRUCT_END #if PPP_SUPPORT && PPP_IPV6_SUPPORT && !LWIP_IPV6 #error "PPP_IPV6_SUPPORT needs LWIP_IPV6 turned on" #endif +#if PPP_SUPPORT && CCP_SUPPORT && !MPPE_SUPPORT +#error "CCP_SUPPORT needs MPPE_SUPPORT turned on" +#endif #if !LWIP_ETHERNET && (LWIP_ARP || PPPOE_SUPPORT) #error "LWIP_ETHERNET needs to be turned on for LWIP_ARP or PPPOE_SUPPORT" #endif