From 391b19781ea6b971708413419171a899efab4c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Falgueras=20Garc=C3=ADa?= Date: Mon, 21 Jun 2021 16:58:07 +0200 Subject: [PATCH] bootutil: Only include if it going to be used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When no dynamic memory is used, there is no need for include "os/malloc.h", and do so will force the user to create an empty "os/malloc.h" file. Signed-off-by: Carlos Falgueras GarcĂ­a --- boot/bootutil/src/loader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c index 28cb65eb..f216dca8 100644 --- a/boot/bootutil/src/loader.c +++ b/boot/bootutil/src/loader.c @@ -35,7 +35,6 @@ #include #include #include -#include #include "bootutil/bootutil.h" #include "bootutil/image.h" #include "bootutil_priv.h" @@ -50,6 +49,10 @@ #include "bootutil/enc_key.h" #endif +#if !defined(MCUBOOT_DIRECT_XIP) && !defined(MCUBOOT_RAM_LOAD) +#include +#endif + #include "mcuboot_config/mcuboot_config.h" BOOT_LOG_MODULE_DECLARE(mcuboot);