mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 05:10:40 +00:00
fixed compiling DNS code again
This commit is contained in:
parent
77270adb96
commit
1e4f312352
@ -1422,6 +1422,7 @@ err_t
|
|||||||
dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found,
|
dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found,
|
||||||
void *callback_arg)
|
void *callback_arg)
|
||||||
{
|
{
|
||||||
|
#if LWIP_IPV4 && LWIP_IPV6
|
||||||
return dns_gethostbyname_addrtype(hostname, addr, found, callback_arg, LWIP_DNS_ADDRTYPE_DEFAULT);
|
return dns_gethostbyname_addrtype(hostname, addr, found, callback_arg, LWIP_DNS_ADDRTYPE_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1435,6 +1436,7 @@ err_t
|
|||||||
dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found,
|
dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found,
|
||||||
void *callback_arg, u8_t dns_addrtype)
|
void *callback_arg, u8_t dns_addrtype)
|
||||||
{
|
{
|
||||||
|
#endif /* LWIP_IPV4 && LWIP_IPV6 */
|
||||||
size_t hostnamelen;
|
size_t hostnamelen;
|
||||||
/* not initialized or no valid server yet, or invalid addr pointer
|
/* not initialized or no valid server yet, or invalid addr pointer
|
||||||
* or invalid hostname or invalid hostname length */
|
* or invalid hostname or invalid hostname length */
|
||||||
@ -1494,4 +1496,14 @@ dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_call
|
|||||||
return dns_enqueue(hostname, hostnamelen, found, callback_arg LWIP_DNS_ADDRTYPE_ARG(dns_addrtype));
|
return dns_enqueue(hostname, hostnamelen, found, callback_arg LWIP_DNS_ADDRTYPE_ARG(dns_addrtype));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !LWIP_IPV4 || !LWIP_IPV6
|
||||||
|
err_t
|
||||||
|
dns_gethostbyname_addrtype(const char *hostname, ip_addr_t *addr, dns_found_callback found,
|
||||||
|
void *callback_arg, u8_t dns_addrtype)
|
||||||
|
{
|
||||||
|
LWIP_UNUSED_ARG(dns_addrtype);
|
||||||
|
return dns_gethostbyname(hostname, addr, found, callback_arg);
|
||||||
|
}
|
||||||
|
#endif /* LWIP_IPV4 && LWIP_IPV6 */
|
||||||
|
|
||||||
#endif /* LWIP_DNS */
|
#endif /* LWIP_DNS */
|
||||||
|
@ -297,7 +297,7 @@ err_t netconn_gethostbyname_addrtype(const char *name, ip_addr_t *addr, u8_t d
|
|||||||
#define netconn_gethostbyname(name, addr) netconn_gethostbyname_addrtype(name, addr, NETCONN_DNS_DEFAULT)
|
#define netconn_gethostbyname(name, addr) netconn_gethostbyname_addrtype(name, addr, NETCONN_DNS_DEFAULT)
|
||||||
#else /* LWIP_IPV4 && LWIP_IPV6 */
|
#else /* LWIP_IPV4 && LWIP_IPV6 */
|
||||||
err_t netconn_gethostbyname(const char *name, ip_addr_t *addr);
|
err_t netconn_gethostbyname(const char *name, ip_addr_t *addr);
|
||||||
#define netconn_gethostbyname_addrtype(name, addr, dns_addrtype netconn_gethostbyname(name, addr)
|
#define netconn_gethostbyname_addrtype(name, addr, dns_addrtype) netconn_gethostbyname(name, addr)
|
||||||
#endif /* LWIP_IPV4 && LWIP_IPV6 */
|
#endif /* LWIP_IPV4 && LWIP_IPV6 */
|
||||||
#endif /* LWIP_DNS */
|
#endif /* LWIP_DNS */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user