[PATCH 1/1] malloc: adjust memcpy() and memset() definitions.
Heinrich Schuchardt
xypron.glpk at gmx.de
Wed Feb 10 18:59:21 CET 2021
Compiling the sandbox fails on armv7 due to conflicting definitions of
memcpy() and memset() in include/malloc.h and include/linux/string.h.
Use linux/string.h here.
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
include/malloc.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/malloc.h b/include/malloc.h
index f66c2e8617..e15e528a2e 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -361,8 +361,11 @@ extern "C" {
#if (__STD_C || defined(HAVE_MEMCPY))
#if __STD_C
+/* U-Boot defines memset() and memcpy in /include/linux/string.h
void* memset(void*, int, size_t);
void* memcpy(void*, const void*, size_t);
+*/
+#include <linux/string.h>
#else
#ifdef WIN32
/* On Win32 platforms, 'memset()' and 'memcpy()' are already declared in */
--
2.30.0
More information about the U-Boot
mailing list