From 10abb6b5ec090bad40ecaebb30f9d3fc3bd0a8bc Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 22 May 2017 19:16:55 +0800 Subject: [PATCH] ethernetif: Add #if LWIP_IPV4 guard around netif->output netif->output and etharp_output are only available when LWIP_IPV4=1. Fix the skeleton file. Signed-off-by: Axel Lin Signed-off-by: goldsimon --- src/netif/ethernetif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/netif/ethernetif.c b/src/netif/ethernetif.c index dc8ae6c4..7867c882 100644 --- a/src/netif/ethernetif.c +++ b/src/netif/ethernetif.c @@ -318,7 +318,9 @@ ethernetif_init(struct netif *netif) * You can instead declare your own function an call etharp_output() * from it if you have to do some checks before sending (e.g. if link * is available...) */ +#if LWIP_IPV4 netif->output = etharp_output; +#endif /* LWIP_IPV4 */ #if LWIP_IPV6 netif->output_ip6 = ethip6_output; #endif /* LWIP_IPV6 */