From 6721ae3555042aa15f6cb76b08d18817bdcaaf91 Mon Sep 17 00:00:00 2001 From: cuiziwei Date: Thu, 19 Oct 2023 16:49:29 +0800 Subject: [PATCH] fix build warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC: vfs/fs_lseek.c /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c: In function ‘HMAC_CTX_new’: /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration] 57 | (mbedtls_md_context_t *)malloc(sizeof(mbedtls_md_context_t)); | ^~~~~~ /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:28:1: note: include ‘’ or provide a declaration of ‘malloc’ 27 | #include +++ |+#include 28 | #include /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch] 57 | (mbedtls_md_context_t *)malloc(sizeof(mbedtls_md_context_t)); | ^~~~~~ /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: note: include ‘’ or provide a declaration of ‘malloc’ /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c: In function ‘HMAC_CTX_free’: /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] 126 | free(ctx); | ^~~~ /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: note: include ‘’ or provide a declaration of ‘free’ /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch] /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: note: include ‘’ or provide a declaration of ‘free’ Signed-off-by: cuiziwei --- crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c b/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c index d1ce54462..0b16617fd 100644 --- a/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c +++ b/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c @@ -26,6 +26,7 @@ #include #include #include +#include /**************************************************************************** * Public Functions