From ff4181e2460f6370d46caf16e2d1b3ecd729153a Mon Sep 17 00:00:00 2001 From: Yanray Wang Date: Tue, 18 Oct 2022 18:16:08 +0800 Subject: [PATCH] Fix build error in cmake while printing digital build version Signed-off-by: Yanray Wang --- programs/ssl/ssl_client2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 451e23264..59a96d212 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -27,6 +27,7 @@ #if defined(MBEDTLS_VERSION_C) #include "mbedtls/build_info.h" +#include "mbedtls/version.h" #endif /* MBEDTLS_VERSION_C */ #if defined(MBEDTLS_SSL_TEST_IMPOSSIBLE) @@ -1004,7 +1005,7 @@ int main( int argc, char *argv[] ) { mbedtls_printf( "build version: %s (build %u)\n", MBEDTLS_VERSION_STRING, - MBEDTLS_VERSION_NUMBER ); + mbedtls_version_get_number() ); goto exit; } } @@ -2481,7 +2482,7 @@ int main( int argc, char *argv[] ) #if defined(MBEDTLS_VERSION_C) mbedtls_printf( "build version: %s (build %u)\n", - MBEDTLS_VERSION_STRING, MBEDTLS_VERSION_NUMBER ); + MBEDTLS_VERSION_STRING, mbedtls_version_get_number() ); #endif /* MBEDTLS_VERSION_C */ #if defined(MBEDTLS_X509_CRT_PARSE_C)