diff --git a/components/snapclient/CMakeLists.txt b/components/snapclient/CMakeLists.txt index 0b4ce4fc..d3655901 100644 --- a/components/snapclient/CMakeLists.txt +++ b/components/snapclient/CMakeLists.txt @@ -1,7 +1,7 @@ idf_component_register(SRCS "snapclient_helper.c" "snapclient.c" "connection_handler.c" INCLUDE_DIRS "include" - PRIV_REQUIRES esp_timer opus flac lightsnapcast + PRIV_REQUIRES esp_timer mdns opus flac lightsnapcast ) if(CONFIG_USE_DSP_PROCESSOR) diff --git a/components/snapclient/connection_handler.c b/components/snapclient/connection_handler.c index f22cd49b..67da69b9 100644 --- a/components/snapclient/connection_handler.c +++ b/components/snapclient/connection_handler.c @@ -139,7 +139,11 @@ void setup_network(esp_netif_t** netif) { continue; } +#if CONFIG_LWIP_IPV4 && !CONFIG_LWIP_IPV6 + remote_ip.addr = re->addr->addr.u_addr.ip4.addr; +#else ip_addr_copy(remote_ip, re->addr->addr); +#endif remotePort = r->port; mdns_query_results_free(r);