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 <axel.lin@ingics.com>
Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
Axel Lin 2017-05-22 19:16:55 +08:00 committed by goldsimon
parent 8db0001e32
commit 10abb6b5ec

View File

@ -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 */