mdns: fix build issue with CONFIG_LWIP_IPV6 disabled

This commit is contained in:
Mahavir Jain
2022-09-02 16:13:17 +05:30
parent 444fae9066
commit 48c157bc46
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
version: "1.0.5"
version: "1.0.6"
description: mDNS
dependencies:
idf:

View File

@ -339,8 +339,12 @@ size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, c
memcpy((uint8_t *)pbt->payload, data, len);
ip_addr_t ip_add_copy;
#if CONFIG_LWIP_IPV6
ip_add_copy.type = ip->type;
memcpy(&(ip_add_copy.u_addr),&(ip->u_addr),sizeof(ip_add_copy.u_addr));
memcpy(&(ip_add_copy.u_addr), &(ip->u_addr), sizeof(ip_add_copy.u_addr));
#else
memcpy(&(ip_add_copy.addr), &(ip->u_addr), sizeof(ip_addr_copy.addr));
#endif // CONFIG_LWIP_IPV6
mdns_api_call_t msg = {
.tcpip_if = tcpip_if,