From bbedb35bf3284255c851b0afe05b16bd14c000ed Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 14 Feb 2017 20:17:27 +0100 Subject: [PATCH] Fix name clash between typedef and struct definition. Interesting, all three compilers in Erik Ekman's travis-ci don't complain. But my gcc at home does... --- src/core/netif.c | 4 ++-- src/include/lwip/netif.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index d74151e6..e105e11c 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -1406,7 +1406,7 @@ netif_find(const char *name) * Add extended netif events listener * @param callback pointer to listener structure */ -void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback fn) +void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback_fn fn) { if (callback->callback_fn != NULL) { return; /* already registered */ @@ -1425,7 +1425,7 @@ void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback f * @param num depends on reason, see reason description * @param arg depends on reason, see reason description */ -void netif_invoke_ext_callback(struct netif* netif, netif_nsc_reason_t reason, u16_t num, void* arg) +void netif_invoke_ext_callback(struct netif* netif, netif_nsc_reason_t reason, u16_t num, const void* arg) { netif_ext_callback_t* callback = ext_callback; diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 1e6185b0..8f002680 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -538,18 +538,18 @@ typedef enum * @param num depends on reason, see reason description * @param arg depends on reason, see reason description */ -typedef void (*netif_ext_callback)(struct netif* netif, netif_nsc_reason_t reason, u16_t num, const void* arg); +typedef void (*netif_ext_callback_fn)(struct netif* netif, netif_nsc_reason_t reason, u16_t num, const void* arg); #if LWIP_NETIF_EXT_STATUS_CALLBACK struct netif_ext_callback; typedef struct netif_ext_callback { - netif_ext_callback callback_fn; + netif_ext_callback_fn callback_fn; struct netif_ext_callback* next; } netif_ext_callback_t; #define NETIF_DECLARE_EXT_CALLBACK(name) static netif_ext_callback_t name; -void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback fn); +void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback_fn fn); void netif_invoke_ext_callback(struct netif* netif, netif_nsc_reason_t reason, u16_t num, const void* arg); #else #define NETIF_DECLARE_EXT_CALLBACK(name)