From: Frederik Wedel-Heinen Date: Tue, 6 Oct 2020 08:41:28 +0000 (+0200) Subject: mbedtls: add missing header when defining MBEDTLS_DEBUG X-Git-Tag: curl-7_73_0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc5455fa74234370ab4bc7dbb3a5f252e8f2d432;p=thirdparty%2Fcurl.git mbedtls: add missing header when defining MBEDTLS_DEBUG Closes #6045 --- diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 71d2b2d073..4e5f6574f1 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -31,6 +31,9 @@ #ifdef USE_MBEDTLS +/* Define this to enable lots of debugging for mbedTLS */ +/* #define MBEDTLS_DEBUG */ + #include #if MBEDTLS_VERSION_NUMBER >= 0x02040000 #include @@ -46,6 +49,12 @@ #include #include +#if MBEDTLS_VERSION_MAJOR >= 2 +# ifdef MBEDTLS_DEBUG +# include +# endif +#endif + #include "urldata.h" #include "sendf.h" #include "inet_pton.h" @@ -113,9 +122,6 @@ static int entropy_func_mutex(void *data, unsigned char *output, size_t len) #endif /* THREADING_SUPPORT */ -/* Define this to enable lots of debugging for mbedTLS */ -#undef MBEDTLS_DEBUG - #ifdef MBEDTLS_DEBUG static void mbed_debug(void *context, int level, const char *f_name, int line_nb, const char *line)