Skip to content

Commit 1135619

Browse files
authored
Merge pull request #5335 from xiangxistu/master
[fix] the problem of implicit declaration for "lwip_ip4_route_src".
2 parents 3dd1aa7 + 9b1f7c4 commit 1135619

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

components/net/lwip-2.1.2/src/arch/sys_arch.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ void ppp_trace(int level, const char *format, ...)
779779
}
780780
#endif
781781

782+
#ifdef LWIP_HOOK_IP4_ROUTE_SRC
782783
struct netif *lwip_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src)
783784
{
784785
struct netif *netif;
@@ -802,6 +803,7 @@ struct netif *lwip_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src)
802803
netif = netif_default;
803804
return netif;
804805
}
806+
#endif /* LWIP_HOOK_IP4_ROUTE_SRC */
805807

806808
/*
807809
* export bsd socket symbol for RT-Thread Application Module

components/net/lwip-2.1.2/src/lwipopts.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,4 +645,7 @@
645645

646646

647647
#define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) lwip_ip4_route_src(dest, src)
648+
#include "lwip/ip_addr.h"
649+
struct netif *lwip_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src);
650+
648651
#endif /* __LWIPOPTS_H__ */

0 commit comments

Comments
 (0)