* [PATCH] tools/nolibc: include arch.h from string.h
@ 2024-07-25 16:54 Thomas Weißschuh
2024-07-25 17:11 ` Willy Tarreau
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Weißschuh @ 2024-07-25 16:54 UTC (permalink / raw)
To: Willy Tarreau, Ammar Faizi, Alviro Iskandar Setiawan
Cc: linux-kernel, stable, Thomas Weißschuh
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 than 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
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
If nobody complains I'll apply this after v6.11-rc1 is released.
---
tools/include/nolibc/string.h | 1 +
1 file changed, 1 insertion(+)
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);
---
base-commit: 6ca8f2e20bd1ced8a7cd12b3ae4b1ceca85cfc2b
change-id: 20240725-arch-has-func-59b6c92ce935
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/nolibc: include arch.h from string.h
2024-07-25 16:54 [PATCH] tools/nolibc: include arch.h from string.h Thomas Weißschuh
@ 2024-07-25 17:11 ` Willy Tarreau
0 siblings, 0 replies; 2+ messages in thread
From: Willy Tarreau @ 2024-07-25 17:11 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Ammar Faizi, Alviro Iskandar Setiawan, linux-kernel, stable
Hi Thomas,
On Thu, Jul 25, 2024 at 06:54:18PM +0200, Thomas Weißschuh wrote:
> 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 than that check
^^^^
then
> 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
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Good catch!
Acked-by: Willy Tarreau <w@1wt.eu>
Thanks,
Willy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-25 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-25 16:54 [PATCH] tools/nolibc: include arch.h from string.h Thomas Weißschuh
2024-07-25 17:11 ` Willy Tarreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®