From 95082693c3cae9a7f2b9cac9a2473ead4146c3c8 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 21 Feb 2023 15:31:52 +1100 Subject: [PATCH] extmod/modbtree: Move system includes within MICROPY_PY_BTREE guard. Since commit d6d87225585a9494093d791c807bce652e4c82d8, modbtree.c is included unconditionally in the build (if SRC_EXTMOD_C is used). So guard the includes of system headers files in case a target doesn't have them. Signed-off-by: Damien George --- extmod/modbtree.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extmod/modbtree.c b/extmod/modbtree.c index 2da65a2c7a..e9c760a389 100644 --- a/extmod/modbtree.c +++ b/extmod/modbtree.c @@ -24,16 +24,14 @@ * THE SOFTWARE. */ -#include -#include -#include // for declaration of global errno variable -#include - #include "py/runtime.h" #include "py/stream.h" #if MICROPY_PY_BTREE +#include +#include // for declaration of global errno variable +#include #include #include <../../btree/btree.h>