diff mbox series

rsa: don't use malloc.h in rsa-sign.c

Message ID 20200515122034.70160-1-jsg@jsg.id.au
State Accepted
Commit 0ff042d836f2a40b2104d4501111fbb340293c5c
Delegated to: Tom Rini
Headers show
Series rsa: don't use malloc.h in rsa-sign.c | expand

Commit Message

Jonathan Gray May 15, 2020, 12:20 p.m. UTC
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(-)

Comments

Tom Rini May 15, 2020, 8:54 p.m. UTC | #1
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!
diff mbox series

Patch

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>