Skip to contentSkip to conversation

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

PATCH New Jonathan Gray 2 participants 2 messages May 15, 2020

lore
Share & tools
lore
#0 lore raw

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

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")
---
 lib/rsa/rsa-sign.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/rsa/rsa-sign.c +1 -1
index 580c744709..621ddc4350 100644
@@ -4,7 +4,7 @@
  */
 
 #include "mkimage.h"
-#include <malloc.h>
+#include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <image.h>
Signature · 1 line
2.26.2
#1 lore raw

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

Quoted 6 lines · Jonathan Gray

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

Applied to u-boot/master, thanks!

Signature · 8 lines
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>