Skip to content

Commit 6ea2987

Browse files
committed
tools/nolibc: include arch.h from string.h
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: 553845e ("tools/nolibc: x86-64: Use `rep movsb` for `memcpy()` and `memmove()`") Fixes: 12108aa ("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>
1 parent 8400291 commit 6ea2987

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/include/nolibc/string.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef _NOLIBC_STRING_H
88
#define _NOLIBC_STRING_H
99

10+
#include "arch.h"
1011
#include "std.h"
1112

1213
static void *malloc(size_t len);

0 commit comments

Comments
 (0)