diff --git a/src/netif/etharp.c b/src/netif/etharp.c index 876018fe..a979b737 100644 --- a/src/netif/etharp.c +++ b/src/netif/etharp.c @@ -1278,7 +1278,9 @@ ethernet_input(struct pbuf *p, struct netif *netif) { struct eth_hdr* ethhdr; u16_t type; +#if LWIP_ARP || ETHARP_SUPPORT_VLAN s16_t ip_hdr_offset = SIZEOF_ETH_HDR; +#endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ if (p->len <= SIZEOF_ETH_HDR) { /* a packet with only an ethernet header (or less) is not valid for us */