diff mbox series

[5/5] rsa_verify_mbedtls: Add missing includes

Message ID 20200205095746.30426-1-ceggers@arri.de
State Accepted
Headers show
Series A bunch of build fixes | expand

Commit Message

Christian Eggers Feb. 5, 2020, 9:57 a.m. UTC
- calloc() and free() require stdlib.h

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 corelib/swupdate_rsa_verify_mbedtls.c | 1 +
 corelib/verify_signature_mbedtls.c    | 1 +
 2 files changed, 2 insertions(+)

Comments

Stefano Babic Feb. 5, 2020, 10:06 a.m. UTC | #1
On 05.02.20 10:57, Christian Eggers wrote:
> - calloc() and free() require stdlib.h
> 
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> ---
>  corelib/swupdate_rsa_verify_mbedtls.c | 1 +
>  corelib/verify_signature_mbedtls.c    | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/corelib/swupdate_rsa_verify_mbedtls.c b/corelib/swupdate_rsa_verify_mbedtls.c
> index 533020b..beeb03d 100644
> --- a/corelib/swupdate_rsa_verify_mbedtls.c
> +++ b/corelib/swupdate_rsa_verify_mbedtls.c
> @@ -8,6 +8,7 @@
>  #include <assert.h>
>  #include <errno.h>
>  #include <fcntl.h>
> +#include <stdlib.h>
>  #include <sys/stat.h>
>  #include <sys/types.h>
>  #include <unistd.h>
> diff --git a/corelib/verify_signature_mbedtls.c b/corelib/verify_signature_mbedtls.c
> index 0dd874d..2921462 100644
> --- a/corelib/verify_signature_mbedtls.c
> +++ b/corelib/verify_signature_mbedtls.c
> @@ -1,5 +1,6 @@
>  #include <ctype.h>
>  #include <errno.h>
> +#include <stdlib.h>
>  
>  #include "sslapi.h"
>  #include "util.h"
> 

I guess it depends on the configuration, and stdlib.h was "implicitly"
included by some other header (because I never seen this warning)- good
catch ;-)

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/corelib/swupdate_rsa_verify_mbedtls.c b/corelib/swupdate_rsa_verify_mbedtls.c
index 533020b..beeb03d 100644
--- a/corelib/swupdate_rsa_verify_mbedtls.c
+++ b/corelib/swupdate_rsa_verify_mbedtls.c
@@ -8,6 +8,7 @@ 
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
diff --git a/corelib/verify_signature_mbedtls.c b/corelib/verify_signature_mbedtls.c
index 0dd874d..2921462 100644
--- a/corelib/verify_signature_mbedtls.c
+++ b/corelib/verify_signature_mbedtls.c
@@ -1,5 +1,6 @@ 
 #include <ctype.h>
 #include <errno.h>
+#include <stdlib.h>
 
 #include "sslapi.h"
 #include "util.h"