From 2aaaf6df9e050a23c843d96520a4999db25827e8 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 29 Jul 2024 17:09:29 +0200 Subject: [PATCH] net/gcoap: fix guards around defines --- sys/include/net/gcoap.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/include/net/gcoap.h b/sys/include/net/gcoap.h index b9b4afebdd..264da5a188 100644 --- a/sys/include/net/gcoap.h +++ b/sys/include/net/gcoap.h @@ -622,12 +622,13 @@ extern "C" { * @brief Stack size for module thread * @{ */ -#ifndef GCOAP_STACK_SIZE +#ifndef GCOAP_DTLS_EXTRA_STACKSIZE #if IS_USED(MODULE_GCOAP_DTLS) #define GCOAP_DTLS_EXTRA_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #else #define GCOAP_DTLS_EXTRA_STACKSIZE (0) #endif +#endif /** * @brief Extra stack for VFS operations @@ -639,6 +640,7 @@ extern "C" { #define GCOAP_VFS_EXTRA_STACKSIZE (0) #endif +#ifndef GCOAP_STACK_SIZE #define GCOAP_STACK_SIZE (THREAD_STACKSIZE_DEFAULT + DEBUG_EXTRA_STACKSIZE \ + sizeof(coap_pkt_t) + GCOAP_DTLS_EXTRA_STACKSIZE \ + GCOAP_VFS_EXTRA_STACKSIZE)