Merge pull request #1905 from enkiller/dev

[components][net] dhcpd Support LWIP2.0 and LWIP1.4
This commit is contained in:
Bernard Xiong 2018-10-18 15:58:35 +08:00 committed by GitHub
commit 29b49f46dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -222,11 +222,12 @@ static void dhcpd_thread_entry(void *parameter)
{
#if (LWIP_VERSION) >= 0x02000000U
ip4_addr_t addr;
ip4addr_aton(DHCPD_SERVER_IP, &addr);
#else
struct ip_addr addr;
ipaddr_aton(DHCPD_SERVER_IP, &addr);
#endif /* LWIP_VERSION */
ip4addr_aton(DHCPD_SERVER_IP, &addr);
DHCPD_SERVER_IPADDR0 = (ntohl(addr.addr) >> 24) & 0xFF;
DHCPD_SERVER_IPADDR1 = (ntohl(addr.addr) >> 16) & 0xFF;
DHCPD_SERVER_IPADDR2 = (ntohl(addr.addr) >> 8) & 0xFF;