From f9b202998b0e30aa086d2876f7491af0baf55c68 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Tue, 27 Nov 2018 17:40:51 -0800 Subject: [PATCH] [mbedtls] update mbedtls-config.h to fix build (#3338) - Add stdio.h for snprintf. - When `MBEDTLS_ECP_ALT` is defined, need to define mbedtls_ecp_restart_ctx for build to succeed. --- third_party/mbedtls/mbedtls-config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/third_party/mbedtls/mbedtls-config.h b/third_party/mbedtls/mbedtls-config.h index ff0cf0ddd..072eab7ae 100644 --- a/third_party/mbedtls/mbedtls-config.h +++ b/third_party/mbedtls/mbedtls-config.h @@ -29,6 +29,7 @@ #ifndef MBEDTLS_CONFIG_H #define MBEDTLS_CONFIG_H +#include #include #include @@ -167,6 +168,10 @@ __inline void mbedtls_platform_zeroize( void *buf, size_t len) #include MBEDTLS_USER_CONFIG_FILE #endif +#if defined(MBEDTLS_ECP_ALT) && !defined(MBEDTLS_ECP_RESTARTABLE) +typedef void mbedtls_ecp_restart_ctx; +#endif + #include "mbedtls/check_config.h" #endif /* MBEDTLS_CONFIG_H */