diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2024-07-25 18:54:18 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-04 16:33:43 +0200 |
| commit | d7e07c2e87d8d9ed2d2f3e434631e24e8ec24dce (patch) | |
| tree | f8ee96d1684f0de21c857fc2dc911cf73d2369d9 /tools | |
| parent | 8d80003cf38aa2c72be79d00689b938e3b8ddc82 (diff) | |
tools/nolibc: include arch.h from string.h
commit 6ea2987c9a7b6c5f37d08a3eaa664c9ff7467670 upstream.
string.h tests for the macros NOLIBC_ARCH_HAS_$FUNC to use the
architecture-optimized function variants.
However if string.h is included before arch.h header then that check
does not work, leading to duplicate function definitions.
Fixes: 553845eebd60 ("tools/nolibc: x86-64: Use `rep movsb` for `memcpy()` and `memmove()`")
Fixes: 12108aa8c1a1 ("tools/nolibc: x86-64: Use `rep stosb` for `memset()`")
Cc: stable@vger.kernel.org
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20240725-arch-has-func-v1-1-5521ed354acd@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/include/nolibc/string.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/include/nolibc/string.h b/tools/include/nolibc/string.h index f9ab28421e6d..9ec9c24f38c0 100644 --- a/tools/include/nolibc/string.h +++ b/tools/include/nolibc/string.h @@ -7,6 +7,7 @@ #ifndef _NOLIBC_STRING_H #define _NOLIBC_STRING_H +#include "arch.h" #include "std.h" static void *malloc(size_t len); |
