mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
Merge branch 'bugfix/udp_client_build_error' into 'master'
socket examples: Fix udp_client build error Closes IDFGH-2982 See merge request espressif/esp-idf!8176
This commit is contained in:
@@ -55,7 +55,6 @@ static void udp_client_task(void *pvParameters)
|
|||||||
dest_addr.sin_port = htons(PORT);
|
dest_addr.sin_port = htons(PORT);
|
||||||
addr_family = AF_INET;
|
addr_family = AF_INET;
|
||||||
ip_protocol = IPPROTO_IP;
|
ip_protocol = IPPROTO_IP;
|
||||||
inet_ntoa_r(dest_addr.sin_addr, addr_str, sizeof(addr_str) - 1);
|
|
||||||
#elif defined(CONFIG_EXAMPLE_IPV6)
|
#elif defined(CONFIG_EXAMPLE_IPV6)
|
||||||
struct sockaddr_in6 dest_addr = { 0 };
|
struct sockaddr_in6 dest_addr = { 0 };
|
||||||
inet6_aton(HOST_IP_ADDR, &dest_addr.sin6_addr);
|
inet6_aton(HOST_IP_ADDR, &dest_addr.sin6_addr);
|
||||||
@@ -64,7 +63,6 @@ static void udp_client_task(void *pvParameters)
|
|||||||
dest_addr.sin6_scope_id = esp_netif_get_netif_impl_index(EXAMPLE_INTERFACE);
|
dest_addr.sin6_scope_id = esp_netif_get_netif_impl_index(EXAMPLE_INTERFACE);
|
||||||
addr_family = AF_INET6;
|
addr_family = AF_INET6;
|
||||||
ip_protocol = IPPROTO_IPV6;
|
ip_protocol = IPPROTO_IPV6;
|
||||||
inet6_ntoa_r(dest_addr.sin6_addr, addr_str, sizeof(addr_str) - 1);
|
|
||||||
#elif defined(CONFIG_EXAMPLE_SOCKET_IP_INPUT_STDIN)
|
#elif defined(CONFIG_EXAMPLE_SOCKET_IP_INPUT_STDIN)
|
||||||
struct sockaddr_in6 dest_addr = { 0 };
|
struct sockaddr_in6 dest_addr = { 0 };
|
||||||
ESP_ERROR_CHECK(get_addr_from_stdin(PORT, SOCK_DGRAM, &ip_protocol, &addr_family, &dest_addr));
|
ESP_ERROR_CHECK(get_addr_from_stdin(PORT, SOCK_DGRAM, &ip_protocol, &addr_family, &dest_addr));
|
||||||
|
Reference in New Issue
Block a user