lwip/src/0001-PPP-PPPoE-fix-build-when-PPPOE_SCNAME_SUPPORT-is-def.patch
Jacob Kroon e6d05db86f PPP, PPPoE: fix build when PPPOE_SCNAME_SUPPORT is defined
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 <gradator@gradator.net>
(cherry picked from commit 7eab5947af4dca53b0d3306788c75bd96ebd8e13)
2019-02-26 16:26:21 +01:00

41 lines
1.8 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 96548ede2b9fcf077e579098b1db9ed397bc7032 Mon Sep 17 00:00:00 2001
From: Jacob Kroon <jacob.kroon@gmail.com>
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 <gradator@gradator.net>
---
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