From 3096f331ee17a37529f6cc12984d82fc077a4f4d Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 26 Jul 2022 14:31:46 +0530 Subject: [PATCH] Fix missing prototype warning when `MBEDTLS_DEPRECATED_REMOVED` is enabled Added the changelog.d entry Signed-off-by: Aditya Patwardhan --- ChangeLog.d/fix_build_error_for_mbedtls_deprecated_removed.txt | 3 +++ library/ssl_tls.c | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 ChangeLog.d/fix_build_error_for_mbedtls_deprecated_removed.txt diff --git a/ChangeLog.d/fix_build_error_for_mbedtls_deprecated_removed.txt b/ChangeLog.d/fix_build_error_for_mbedtls_deprecated_removed.txt new file mode 100644 index 000000000..a70521a00 --- /dev/null +++ b/ChangeLog.d/fix_build_error_for_mbedtls_deprecated_removed.txt @@ -0,0 +1,3 @@ +Bugfix + * Fix build error due to missing prototype + warning when MBEDTLS_DEPRECATED_REMOVED is enabled diff --git a/library/ssl_tls.c b/library/ssl_tls.c index eefd89dd9..d3067e3ad 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -2502,6 +2502,7 @@ void mbedtls_ssl_get_dtls_srtp_negotiation_result( const mbedtls_ssl_context *ss } #endif /* MBEDTLS_SSL_DTLS_SRTP */ +#if !defined(MBEDTLS_DEPRECATED_REMOVED) void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf, int major, int minor ) { conf->max_tls_version = (major << 8) | minor; @@ -2511,6 +2512,7 @@ void mbedtls_ssl_conf_min_version( mbedtls_ssl_config *conf, int major, int mino { conf->min_tls_version = (major << 8) | minor; } +#endif /* MBEDTLS_DEPRECATED_REMOVED */ #if defined(MBEDTLS_SSL_SRV_C) void mbedtls_ssl_conf_cert_req_ca_list( mbedtls_ssl_config *conf,