diff --git a/src/include/netif/ppp/ppp.h b/src/include/netif/ppp/ppp.h index de740ec7..862b8269 100644 --- a/src/include/netif/ppp/ppp.h +++ b/src/include/netif/ppp/ppp.h @@ -427,6 +427,7 @@ struct ppp_pcb_s { * only be called while the PPP is in the dead phase (i.e. disconnected). */ +#if PPP_AUTH_SUPPORT /* * Set PPP authentication. * @@ -458,7 +459,6 @@ struct ppp_pcb_s { #define PPPAUTHTYPE_ANY 0xff void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd); -#if PPP_AUTH_SUPPORT /* * Whether peer is required to authenticate. This is mostly necessary for PPP server support. */ diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 7f7e9c3f..c0d2004b 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -209,8 +209,8 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc /***********************************/ /*** PUBLIC FUNCTION DEFINITIONS ***/ /***********************************/ -void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) { #if PPP_AUTH_SUPPORT +void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) { #if PAP_SUPPORT pcb->settings.refuse_pap = !(authtype & PPPAUTHTYPE_PAP); #endif /* PAP_SUPPORT */ @@ -226,13 +226,8 @@ void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *pas #endif /* EAP_SUPPORT */ pcb->settings.user = user; pcb->settings.passwd = passwd; -#else /* PPP_AUTH_SUPPORT */ - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(authtype); - LWIP_UNUSED_ARG(user); - LWIP_UNUSED_ARG(passwd); -#endif /* PPP_AUTH_SUPPORT */ } +#endif /* PPP_AUTH_SUPPORT */ #if MPPE_SUPPORT /* Set MPPE configuration */