From 9e24d22ce9459b6a8765248234a77bcdefd26b25 Mon Sep 17 00:00:00 2001 From: Daniel Mangum Date: Sat, 2 Sep 2023 17:19:57 -0400 Subject: [PATCH] coap_address.c: do not enable IPV4 broadcast as multicast with Zephyr Adds a check to ensure IPV4 broadcast as multicast is not enabled when using Zephyr as it will break builds with Zephyr's minimal libc, which is missing ifaddr.h. Signed-off-by: Daniel Mangum --- src/coap_address.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coap_address.c b/src/coap_address.c index ab63681d..5e0020ac 100644 --- a/src/coap_address.c +++ b/src/coap_address.c @@ -139,7 +139,7 @@ coap_is_mcast(const coap_address_t *a) { return 0; } -#if !defined(WIN32) +#if !defined(WIN32) && !defined(__ZEPHYR__) #ifndef COAP_BCST_CNT #define COAP_BCST_CNT 15 @@ -234,13 +234,13 @@ coap_is_bcast(const coap_address_t *a) { return 0; #endif /* COAP_IPV4_SUPPORT */ } -#else /* WIN32 */ +#else /* WIN32 || __ZEPHYR__ */ int coap_is_bcast(const coap_address_t *a) { (void)a; return 0; } -#endif /* WIN32 || ESPIDF_VERSION */ +#endif /* WIN32 || __ZEPHYR__ */ #endif /* !defined(WITH_CONTIKI) && !defined(WITH_LWIP) */