arch/x86/boot/string.h defines string functions used by arch/x86/purgatory/purgatory.c. Other headers used by this file may pull in existing definitions of memmove() and strlen(), so extend the overrides to these macros/functions as well. (This is needed as purgatory uses crypto functions which pull in other headers that I am changing in this patch series and causing errors.) We might consider simply moving all of this into purgatory.c after all the #includes to avoid similar issues in the future. Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Borislav Petkov <bp@xxxxxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Cc: x86@xxxxxxxxxx Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx> --- arch/x86/boot/string.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/boot/string.h b/arch/x86/boot/string.h index a5b05ebc037d..ac25100183bc 100644 --- a/arch/x86/boot/string.h +++ b/arch/x86/boot/string.h @@ -4,6 +4,7 @@ /* Undef any of these macros coming from string_32.h. */ #undef memcpy +#undef memmove #undef memset #undef memcmp @@ -15,9 +16,12 @@ int bcmp(const void *s1, const void *s2, size_t len); /* Access builtin version by default. */ #define memcpy(d,s,l) __builtin_memcpy(d,s,l) +#define memmove(d,s,l) __builtin_memmove(d,s,l) #define memset(d,c,l) __builtin_memset(d,c,l) #define memcmp __builtin_memcmp +#undef strlen + extern int strcmp(const char *str1, const char *str2); extern int strncmp(const char *cs, const char *ct, size_t count); extern size_t strlen(const char *s); -- 2.39.3