[DHCPD] fixed compile error if use legacy LWIP.

This commit is contained in:
aozima 2018-05-09 21:26:43 +08:00
parent 47a0e46478
commit efadb37f4c
1 changed files with 4 additions and 0 deletions

View File

@ -220,7 +220,11 @@ static void dhcpd_thread_entry(void *parameter)
/* our DHCP server information */ /* our DHCP server information */
{ {
#if (LWIP_VERSION) >= 0x02000000U
ip4_addr_t addr; ip4_addr_t addr;
#else
struct ip_addr addr;
#endif /* LWIP_VERSION */
ip4addr_aton(DHCPD_SERVER_IP, &addr); ip4addr_aton(DHCPD_SERVER_IP, &addr);
DHCPD_SERVER_IPADDR0 = (ntohl(addr.addr) >> 24) & 0xFF; DHCPD_SERVER_IPADDR0 = (ntohl(addr.addr) >> 24) & 0xFF;