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 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2024-06-12 18:04:22 +08:00 committed by Xiang Xiao
parent 65264051aa
commit 4581cbdb7e
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,8 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <sys/types.h>
# include <stdbool.h>