esp-idf: Fixes for ESP-IDF environment

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2023-07-17 09:45:10 +01:00
1 parent d17f47ab54
commit 8b5356fb61
2 files changed
+7 -3

No files matched your search

+3 -3
View File
@@ -139,7 +139,7 @@ coap_is_mcast(const coap_address_t *a) {
return 0;
}
#if !defined(WIN32)
#if !defined(WIN32) && !defined(ESPIDF_VERSION)
#ifndef COAP_BCST_CNT
#define COAP_BCST_CNT 6
@@ -228,13 +228,13 @@ coap_is_bcast(const coap_address_t *a) {
return 0;
#endif /* COAP_IPV4_SUPPORT */
}
#else /* WIN32 */
#else /* WIN32 || ESPIDF_VERSION */
int
coap_is_bcast(const coap_address_t *a) {
(void)a;
return 0;
}
#endif /* WIN32 */
#endif /* WIN32 || ESPIDF_VERSION */
#endif /* !defined(WITH_CONTIKI) && !defined(WITH_LWIP) */
+4
View File
@@ -4043,7 +4043,9 @@ coap_join_mcast_group_intf(coap_context_t *ctx, const char *group_name,
#if COAP_IPV4_SUPPORT
struct ip_mreq mreq4;
#endif /* COAP_IPV4_SUPPORT */
#if COAP_IPV6_SUPPORT
struct ipv6_mreq mreq6;
#endif /* COAP_IPV6_SUPPORT */
struct addrinfo *resmulti = NULL, hints, *ainfo;
int result = -1;
coap_endpoint_t *endpoint;
@@ -4055,7 +4057,9 @@ coap_join_mcast_group_intf(coap_context_t *ctx, const char *group_name,
return -1;
/* Default is let the kernel choose */
#if COAP_IPV6_SUPPORT
mreq6.ipv6mr_interface = 0;
#endif /* COAP_IPV6_SUPPORT */
#if COAP_IPV4_SUPPORT
mreq4.imr_interface.s_addr = INADDR_ANY;
#endif /* COAP_IPV4_SUPPORT */