[PATCH] tools/nolibc: include arch.h from string.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxxx>





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux