未验证 提交 3eb3a736 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2831 from Lawlieta/develop

[net][lwip][dhcpd] Fix dhcp server compile error in lwIP 2.1.0
......@@ -686,8 +686,6 @@ int eth_system_device_init(void)
}
INIT_PREV_EXPORT(eth_system_device_init);
#ifdef RT_USING_FINSH
#include <finsh.h>
void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
{
struct ip_addr *ip;
......@@ -733,6 +731,9 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
netif_set_netmask(netif, ip);
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(set_if, set network interface address);
#if LWIP_DNS
......
......@@ -715,8 +715,6 @@ int eth_system_device_init_private(void)
return (int)result;
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
{
ip4_addr_t *ip;
......@@ -762,6 +760,9 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
netif_set_netmask(netif, ip);
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(set_if, set network interface address);
#if LWIP_DNS
......
......@@ -720,8 +720,6 @@ int eth_system_device_init_private(void)
return (int)result;
}
#ifdef RT_USING_FINSH
#include <finsh.h>
void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
{
ip4_addr_t *ip;
......@@ -767,6 +765,9 @@ void set_if(char* netif_name, char* ip_addr, char* gw_addr, char* nm_addr)
netif_set_netmask(netif, ip);
}
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT(set_if, set network interface address);
#if LWIP_DNS
......
......@@ -2,7 +2,7 @@ from building import *
cwd = GetCurrentDir()
if GetDepend('RT_USING_LWIP202'):
if GetDepend('RT_USING_LWIP202') or GetDepend('RT_USING_LWIP210') :
src = ['dhcp_server_raw.c']
else:
src = ['dhcp_server.c']
......
......@@ -97,6 +97,10 @@
#define LWIP_NETIF_LOCK(...)
#define LWIP_NETIF_UNLOCK(...)
#ifndef DHCP_SERVER_PORT
#define DHCP_SERVER_PORT 67
#endif
/**
* The dhcp client node struct.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册