From adccbc9f2a4be7089f3c68c221bbfe7cecabbb9c Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Fri, 20 Aug 2021 17:33:47 +0200 Subject: [PATCH] pkg/lwip: Fix compilation without IPv6 RIOT/pkg/lwip/init_devs/init.c:65:61: error: 'tcpip_6lowpan_input' undeclared (first use in this function) return netif_add_noaddr(netif, state, lwip_netdev_init, tcpip_6lowpan_input); ^ --- pkg/lwip/include/lwip_init_devs.h | 2 ++ pkg/lwip/init_devs/init.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/lwip/include/lwip_init_devs.h b/pkg/lwip/include/lwip_init_devs.h index f048cb6293..3e65453ba3 100644 --- a/pkg/lwip/include/lwip_init_devs.h +++ b/pkg/lwip/include/lwip_init_devs.h @@ -41,6 +41,7 @@ void lwip_netif_init_devs(void); */ struct netif *lwip_add_ethernet(struct netif *netif, netdev_t *state); +#if IS_USED(MODULE_LWIP_SIXLOWPAN) /** * @brief Adds a 6LoWPAN netif using the supplied netdev. * @@ -50,6 +51,7 @@ struct netif *lwip_add_ethernet(struct netif *netif, netdev_t *state); * The netif will be set up using the `lwip_netdev_init` helper. */ struct netif *lwip_add_6lowpan(struct netif *netif, netdev_t *state); +#endif /* MODULE_LWIP_SIXLOWPAN */ typedef void (*lwip_netif_setup_func_t)(void); diff --git a/pkg/lwip/init_devs/init.c b/pkg/lwip/init_devs/init.c index bb567e9a27..c5ea854e96 100644 --- a/pkg/lwip/init_devs/init.c +++ b/pkg/lwip/init_devs/init.c @@ -60,9 +60,11 @@ struct netif *lwip_add_ethernet(struct netif *netif, netdev_t *state) return _if; } +#if IS_USED(MODULE_LWIP_SIXLOWPAN) struct netif *lwip_add_6lowpan(struct netif *netif, netdev_t *state) { return netif_add_noaddr(netif, state, lwip_netdev_init, tcpip_6lowpan_input); } +#endif /* MODULE_LWIP_SIXLOWPAN */ /**@}*/