From 993267d74538781fe2344b65525a357d5ea5f6e3 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Tue, 17 May 2022 13:51:36 +0000 Subject: [PATCH] coap_config_posix.h: Set up defines for correct mutex usage if COAP_CONSTRAINED_STACK is defined (is for esp-idf), the mutexes set up to protect the critical sections were not working as expected and were just dummy entries. Use the pthread_ version of the mutex instead by defining HAVE_PTHREAD_H and HAVE_PTHREAD_MUTEX_LOCK. --- components/coap/port/include/coap_config_posix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/coap/port/include/coap_config_posix.h b/components/coap/port/include/coap_config_posix.h index b24335ad15..f96faea766 100644 --- a/components/coap/port/include/coap_config_posix.h +++ b/components/coap/port/include/coap_config_posix.h @@ -30,6 +30,8 @@ #define HAVE_NETDB_H #define HAVE_NETINET_IN_H #define HAVE_STRUCT_CMSGHDR +#define HAVE_PTHREAD_H +#define HAVE_PTHREAD_MUTEX_LOCK #define COAP_DISABLE_TCP 0 #define ipi_spec_dst ipi_addr