From 67e08e48c51ade64c865531649297bc08daf4b7c Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Fri, 2 Oct 2015 10:56:19 -0600 Subject: [PATCH] Github Issue #130 (XMALLOC_USER, NO_WOLFSSL_MEMORY) with FREERTOS --- wolfssl/wolfcrypt/settings.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 726bb117c..431c70d7d 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -381,9 +381,13 @@ static char *fgets(char *buff, int sz, FILE *fp) #ifdef FREERTOS #include "FreeRTOS.h" + /* FreeRTOS pvPortRealloc() only in AVR32_UC3 port */ - #define XMALLOC(s, h, type) pvPortMalloc((s)) - #define XFREE(p, h, type) vPortFree((p)) + #if !defined(XMALLOC_USER) && !defined(NO_WOLFSSL_MEMORY) + #define XMALLOC(s, h, type) pvPortMalloc((s)) + #define XFREE(p, h, type) vPortFree((p)) + #endif + #ifndef NO_WRITEV #define NO_WRITEV #endif