From c53389e46f94f7161ef9cfb69b23141b568588fc Mon Sep 17 00:00:00 2001 From: bernard Date: Tue, 31 Jan 2017 13:17:34 +0800 Subject: [PATCH] [finsh] Add lwip 2.0.0 support. --- components/finsh/msh_cmd.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/components/finsh/msh_cmd.c b/components/finsh/msh_cmd.c index 29a30eabe6..67708d33e6 100644 --- a/components/finsh/msh_cmd.c +++ b/components/finsh/msh_cmd.c @@ -314,6 +314,9 @@ FINSH_FUNCTION_EXPORT_ALIAS(cmd_ifconfig, __cmd_ifconfig, list the information o #ifdef RT_LWIP_DNS #include #include +#include +#include + int cmd_dns(int argc, char **argv) { extern void set_dns(char* dns_server); @@ -321,12 +324,22 @@ int cmd_dns(int argc, char **argv) if (argc == 1) { int index; - struct ip_addr ip_addr; + +#if (LWIP_VERSION) < 0x02000000U + ip_addr_t ip_addr; + for(index=0; index