All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] malloc: adjust memcpy() and memset() definitions.
@ 2021-02-10 17:59 Heinrich Schuchardt
  2021-02-10 21:34 ` Simon Glass
  2021-02-25 13:25 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Heinrich Schuchardt @ 2021-02-10 17:59 UTC (permalink / raw)
  To: u-boot

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 1/1] malloc: adjust memcpy() and memset() definitions.
  2021-02-10 17:59 [PATCH 1/1] malloc: adjust memcpy() and memset() definitions Heinrich Schuchardt
@ 2021-02-10 21:34 ` Simon Glass
  2021-02-25 13:25 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2021-02-10 21:34 UTC (permalink / raw)
  To: u-boot

On Wed, 10 Feb 2021 at 10:59, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> 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>
> ---
>  include/malloc.h | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] malloc: adjust memcpy() and memset() definitions.
  2021-02-10 17:59 [PATCH 1/1] malloc: adjust memcpy() and memset() definitions Heinrich Schuchardt
  2021-02-10 21:34 ` Simon Glass
@ 2021-02-25 13:25 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-02-25 13:25 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 10, 2021 at 06:59:21PM +0100, Heinrich Schuchardt wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210225/648a8324/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-25 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 17:59 [PATCH 1/1] malloc: adjust memcpy() and memset() definitions Heinrich Schuchardt
2021-02-10 21:34 ` Simon Glass
2021-02-25 13:25 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.