PPP: remove unknown define references to PPP_NUM_TIMEOUTS when PPP_SUPPORT is disabled

Fail to build if PPP_SUPPORT is disabled because PPP_NUM_TIMEOUTS
references defines that are unknown if PPP_SUPPORT == 0. Move
PPP_NUM_TIMEOUTS to PPP_SUPPORT block and set a default value to 0
if PPP_NUM_TIMEOUTS is still not defined at the end of ppp_opts.h.

Fixes: e4e0fc4193 ("PPP: set PPP_NUM_TIMEOUTS_PER_PCB value to computed number of simultaneous timers")
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
This commit is contained in:
Sylvain Rochet 2018-06-18 10:13:23 +02:00
parent 871f27628b
commit ce16f8c498

View File

@ -72,6 +72,8 @@
#define LWIP_PPP_API (PPP_SUPPORT && (NO_SYS == 0))
#endif
#if PPP_SUPPORT
/**
* MEMP_NUM_PPP_PCB: the number of simultaneously active PPP
* connections (requires the PPP_SUPPORT option)
@ -92,8 +94,6 @@
/* The number of sys_timeouts required for the PPP module */
#define PPP_NUM_TIMEOUTS (PPP_SUPPORT * PPP_NUM_TIMEOUTS_PER_PCB * MEMP_NUM_PPP_PCB)
#if PPP_SUPPORT
/**
* MEMP_NUM_PPPOS_INTERFACES: the number of concurrently active PPPoS
* interfaces (only used with PPPOS_SUPPORT==1)
@ -602,4 +602,9 @@
#endif /* PPP_SUPPORT */
/* Default value if unset */
#ifndef PPP_NUM_TIMEOUTS
#define PPP_NUM_TIMEOUTS 0
#endif /* PPP_NUM_TIMEOUTS */
#endif /* LWIP_PPP_OPTS_H */