From 4581cbdb7e548e74cbda2d4602d2c3665dcde1e2 Mon Sep 17 00:00:00 2001 From: chenrun1 Date: Wed, 12 Jun 2024 18:04:22 +0800 Subject: [PATCH] libc.h:Fixed the problem of multiple define appearing in arch_xxx.S after opening kasan The reason is that libc.h needs to check whether CONFIG is enabled before the corresponding macro is enabled Error scene: arm-none-eabi-ld: /home/crafcat7/SSD/xxx/xxx-dev/nuttx/staging/libc.a(arch_libc.o): in function `memmove': /home/crafcat7/SSD/xxx/xxx-dev/nuttx/libs/libc/machine/arch_libc.c:146: multiple definition of `memmove'; /home/crafcat7/SSD/xxx/xxx-dev/nuttx/staging/libc.a(arch_memmove.o):/home/crafcat7/SSD/xxx/xxx-dev/nuttx/libs/libc/machine/arm/armv8-m/gnu/arch_memmove.S:56: first defined here Signed-off-by: chenrun1 --- libs/libc/libc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/libc/libc.h b/libs/libc/libc.h index 540c805595..b531fa87ff 100644 --- a/libs/libc/libc.h +++ b/libs/libc/libc.h @@ -25,6 +25,8 @@ * Included Files ****************************************************************************/ +#include + #ifndef __ASSEMBLY__ # include # include