public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] rsa: don't use malloc.h in rsa-sign.c
@ 2020-05-15 12:20 Jonathan Gray
  2020-05-15 20:54 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Gray @ 2020-05-15 12:20 UTC (permalink / raw)
  To: u-boot

stdlib.h is the header for malloc since at least c89/c90.
There is no system malloc.h on OpenBSD and trying to use malloc.h here
falls back to the U-Boot malloc.h breaking the build of qemu_arm64.

Fixes: 336d4615f8 ("dm: core: Create a new header file for 'compat' features")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
---
 lib/rsa/rsa-sign.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index 580c744709..621ddc4350 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -4,7 +4,7 @@
  */
 
 #include "mkimage.h"
-#include <malloc.h>
+#include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <image.h>
-- 
2.26.2

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

* [PATCH] rsa: don't use malloc.h in rsa-sign.c
  2020-05-15 12:20 [PATCH] rsa: don't use malloc.h in rsa-sign.c Jonathan Gray
@ 2020-05-15 20:54 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-05-15 20:54 UTC (permalink / raw)
  To: u-boot

On Fri, May 15, 2020 at 10:20:34PM +1000, Jonathan Gray wrote:

> stdlib.h is the header for malloc since at least c89/c90.
> There is no system malloc.h on OpenBSD and trying to use malloc.h here
> falls back to the U-Boot malloc.h breaking the build of qemu_arm64.
> 
> Fixes: 336d4615f8 ("dm: core: Create a new header file for 'compat' features")
> Signed-off-by: Jonathan Gray <jsg@jsg.id.au>

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/20200515/ce14a5ae/attachment.sig>

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

end of thread, other threads:[~2020-05-15 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-15 12:20 [PATCH] rsa: don't use malloc.h in rsa-sign.c Jonathan Gray
2020-05-15 20:54 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox