summaryrefslogtreecommitdiff
path: root/include/malloc.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-02-10 20:59:21 +0300
committerTom Rini <trini@konsulko.com>2021-02-25 00:51:48 +0300
commitc6bf4f38988996f12c69a1cb5470bf9bea7c88ce (patch)
tree5eeb4ed36a269f4a97a6c668635283a1553eee6b /include/malloc.h
parentdb5f1a50eff8cadd463cebd4448e00a9a2934f40 (diff)
downloadu-boot-c6bf4f38988996f12c69a1cb5470bf9bea7c88ce.tar.xz
malloc: adjust memcpy() and memset() definitions.
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@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/malloc.h')
-rw-r--r--include/malloc.h3
1 files changed, 3 insertions, 0 deletions
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 */