forked from espressif/esp-idf
Merge branch 'fix/fix_esp_tls_ipv6_only_build_issue' into 'master'
fix(esp-tls): Fixed build issue in esp-tls related to IPV6 only config See merge request espressif/esp-idf!38722
This commit is contained in:
@@ -378,9 +378,12 @@ static inline esp_err_t tcp_connect(const char *host, int hostlen, int port, con
|
||||
|
||||
ret = ESP_ERR_ESP_TLS_FAILED_CONNECT_TO_HOST;
|
||||
ESP_LOGD(TAG, "[sock=%d] Connecting to server. HOST: %s, Port: %d", fd, host, port);
|
||||
#if IPV6_ENABLED
|
||||
#if IPV4_ENABLED && IPV6_ENABLED
|
||||
socklen_t addr_len = (address.ss_family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6);
|
||||
#elif IPV6_ENABLED
|
||||
socklen_t addr_len = sizeof(struct sockaddr_in6);
|
||||
#else
|
||||
/* IPv4 only */
|
||||
socklen_t addr_len = sizeof(struct sockaddr_in);
|
||||
#endif
|
||||
if (connect(fd, (struct sockaddr *)&address, addr_len) < 0) {
|
||||
|
@@ -59,6 +59,8 @@ examples/protocols/http_server:
|
||||
reason: only test on these targets
|
||||
depends_components+:
|
||||
- esp_http_server
|
||||
- esp-tls
|
||||
- esp_netif
|
||||
|
||||
examples/protocols/http_server/async_handlers:
|
||||
<<: *default_rules
|
||||
|
Reference in New Issue
Block a user