From 5220781b984f40d237ff7dbd9158176838788cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 2 Oct 2019 15:55:23 +0200 Subject: [PATCH] Fix missing include in some files Add it in all files that use mbedtls_plaform_memset() but didn't already include platfom_util.h. In some configurations it just happened to work, either because it was included indirectly or because the part of the code that used that function was disabled, but it some configurations it broke, so let's fix it properly. --- library/debug.c | 1 + library/entropy_poll.c | 1 + library/error.c | 1 + library/net_sockets.c | 1 + library/pkcs11.c | 1 + library/pkcs5.c | 1 + library/ssl_cache.c | 1 + scripts/data_files/error.fmt | 1 + 8 files changed, 8 insertions(+) diff --git a/library/debug.c b/library/debug.c index 9c8c2f68f..a55324ec9 100644 --- a/library/debug.c +++ b/library/debug.c @@ -42,6 +42,7 @@ #include #include #include +#include "mbedtls/platform_util.h" #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ !defined(inline) && !defined(__cplusplus) diff --git a/library/entropy_poll.c b/library/entropy_poll.c index 413be4a53..1fe4e81dc 100644 --- a/library/entropy_poll.c +++ b/library/entropy_poll.c @@ -31,6 +31,7 @@ #endif #include +#include "mbedtls/platform_util.h" #if defined(MBEDTLS_ENTROPY_C) diff --git a/library/error.c b/library/error.c index 5a813f1ac..c993524fe 100644 --- a/library/error.c +++ b/library/error.c @@ -28,6 +28,7 @@ #if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY) #include "mbedtls/error.h" #include +#include "mbedtls/platform_util.h" #endif #if defined(MBEDTLS_PLATFORM_C) diff --git a/library/net_sockets.c b/library/net_sockets.c index 58244e5eb..76b0ecde2 100644 --- a/library/net_sockets.c +++ b/library/net_sockets.c @@ -47,6 +47,7 @@ #include "mbedtls/net_sockets.h" #include +#include "mbedtls/platform_util.h" #if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \ !defined(EFI32) diff --git a/library/pkcs11.c b/library/pkcs11.c index ecdfde9e2..7bbc5550c 100644 --- a/library/pkcs11.c +++ b/library/pkcs11.c @@ -40,6 +40,7 @@ #endif #include +#include "mbedtls/platform_util.h" void mbedtls_pkcs11_init( mbedtls_pkcs11_context *ctx ) { diff --git a/library/pkcs5.c b/library/pkcs5.c index e551547b9..7580da758 100644 --- a/library/pkcs5.c +++ b/library/pkcs5.c @@ -46,6 +46,7 @@ #endif /* MBEDTLS_ASN1_PARSE_C */ #include +#include "mbedtls/platform_util.h" #if defined(MBEDTLS_PLATFORM_C) #include "mbedtls/platform.h" diff --git a/library/ssl_cache.c b/library/ssl_cache.c index fefc6d0dd..36c4398f6 100644 --- a/library/ssl_cache.c +++ b/library/ssl_cache.c @@ -43,6 +43,7 @@ #include "mbedtls/ssl_internal.h" #include +#include "mbedtls/platform_util.h" void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache ) { diff --git a/scripts/data_files/error.fmt b/scripts/data_files/error.fmt index f3bbee548..4be2d85d0 100644 --- a/scripts/data_files/error.fmt +++ b/scripts/data_files/error.fmt @@ -28,6 +28,7 @@ #if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY) #include "mbedtls/error.h" #include +#include "mbedtls/platform_util.h" #endif #if defined(MBEDTLS_PLATFORM_C)