diff --git a/src/0001-PPP-PPPoE-fix-build-when-PPPOE_SCNAME_SUPPORT-is-def.patch b/src/0001-PPP-PPPoE-fix-build-when-PPPOE_SCNAME_SUPPORT-is-def.patch new file mode 100644 index 00000000..84461ba5 --- /dev/null +++ b/src/0001-PPP-PPPoE-fix-build-when-PPPOE_SCNAME_SUPPORT-is-def.patch @@ -0,0 +1,40 @@ +From 96548ede2b9fcf077e579098b1db9ed397bc7032 Mon Sep 17 00:00:00 2001 +From: Jacob Kroon +Date: Tue, 18 Dec 2018 22:08:03 +0100 +Subject: [PATCH] PPP, PPPoE: fix build when PPPOE_SCNAME_SUPPORT is defined +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +lwip/src/netif/ppp/pppoe.c:768:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$ + l1 = (int)strlen(sc->sc_service_name); +lwip/src/netif/ppp/pppoe.c:772:24: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=poin$ + l2 = (int)strlen(sc->sc_concentrator_name); + +sc->sc_service_name and sc->sc_concentrator_name are best defined as +char* because there are passed to libc strings functions which expect +a char*. + +Signed-off-by: Sylvain Rochet +--- + src/include/netif/ppp/pppoe.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/include/netif/ppp/pppoe.h b/src/include/netif/ppp/pppoe.h +index d5d8a164..e2d20a2b 100644 +--- a/src/include/netif/ppp/pppoe.h ++++ b/src/include/netif/ppp/pppoe.h +@@ -150,8 +150,8 @@ struct pppoe_softc { + u8_t sc_state; /* discovery phase or session connected */ + + #if PPPOE_SCNAME_SUPPORT +- u8_t *sc_service_name; /* if != NULL: requested name of service */ +- u8_t *sc_concentrator_name; /* if != NULL: requested concentrator id */ ++ char *sc_service_name; /* if != NULL: requested name of service */ ++ char *sc_concentrator_name; /* if != NULL: requested concentrator id */ + #endif /* PPPOE_SCNAME_SUPPORT */ + u8_t sc_ac_cookie[PPPOE_MAX_AC_COOKIE_LEN]; /* content of AC cookie we must echo back */ + u8_t sc_ac_cookie_len; /* length of cookie data */ +-- +2.20.1 + diff --git a/src/include/netif/ppp/pppoe.h b/src/include/netif/ppp/pppoe.h index d5d8a164..e2d20a2b 100644 --- a/src/include/netif/ppp/pppoe.h +++ b/src/include/netif/ppp/pppoe.h @@ -150,8 +150,8 @@ struct pppoe_softc { u8_t sc_state; /* discovery phase or session connected */ #if PPPOE_SCNAME_SUPPORT - u8_t *sc_service_name; /* if != NULL: requested name of service */ - u8_t *sc_concentrator_name; /* if != NULL: requested concentrator id */ + char *sc_service_name; /* if != NULL: requested name of service */ + char *sc_concentrator_name; /* if != NULL: requested concentrator id */ #endif /* PPPOE_SCNAME_SUPPORT */ u8_t sc_ac_cookie[PPPOE_MAX_AC_COOKIE_LEN]; /* content of AC cookie we must echo back */ u8_t sc_ac_cookie_len; /* length of cookie data */