diff --git a/src/libwolfboot.c b/src/libwolfboot.c index 40ba5e0e78..db414f23bf 100644 --- a/src/libwolfboot.c +++ b/src/libwolfboot.c @@ -156,7 +156,8 @@ int wolfBoot_initialize_encryption(void) /* MAGIC (4B) + PART_FLAG (1B) */ #endif /* EXT_FLASH && EXT_ENCRYPTED */ -#if !defined(__WOLFBOOT) && !defined(UNIT_TEST) +#if !defined(__WOLFBOOT) && !defined(UNIT_TEST) && \ + (!defined(EXT_ENCRYPTED) || defined(BUILD_TOOL)) /* Avoid redefining if already defined by wolfSSL headers */ #if !defined(XMEMSET) #define XMEMSET memset