diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index b5fb7a9e0..6d180137e 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -721,18 +721,20 @@ extern void uITRON4_free(void *p) ; !defined(WOLFSSL_STATIC_MEMORY) #define XMALLOC(s, h, type) pvPortMalloc((s)) #define XFREE(p, h, type) vPortFree((p)) - #endif - /* FreeRTOS pvPortRealloc() implementation can be found here: - https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */ - #if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || defined(HAVE_ED448) - #if defined(WOLFSSL_ESPIDF) - /*In IDF, realloc(p, n) is equivalent to - heap_caps_realloc(p, s, MALLOC_CAP_8BIT) */ - #define XREALLOC(p, n, h, t) realloc((p), (n)) - #else - #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n)) + /* FreeRTOS pvPortRealloc() implementation can be found here: + https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */ + #if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || \ + defined(HAVE_ED448) + #if defined(WOLFSSL_ESPIDF) + /*In IDF, realloc(p, n) is equivalent to + heap_caps_realloc(p, s, MALLOC_CAP_8BIT) */ + #define XREALLOC(p, n, h, t) realloc((p), (n)) + #else + #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n)) + #endif #endif #endif + #ifndef NO_WRITEV #define NO_WRITEV #endif @@ -910,11 +912,13 @@ extern void uITRON4_free(void *p) ; !defined(WOLFSSL_STATIC_MEMORY) #define XMALLOC(s, h, type) pvPortMalloc((s)) #define XFREE(p, h, type) vPortFree((p)) - #endif - /* FreeRTOS pvPortRealloc() implementation can be found here: - https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */ - #if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || defined(HAVE_ED448) - #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n)) + + /* FreeRTOS pvPortRealloc() implementation can be found here: + https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */ + #if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || \ + defined(HAVE_ED448) + #define XREALLOC(p, n, h, t) pvPortRealloc((p), (n)) + #endif #endif #endif