platform: Include stdarg.h where needed
Windows builds also need stdarg.h included when using variadic
functions.
Fixes #2656
diff --git a/ChangeLog b/ChangeLog
index fbc9d7b..e2389d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,6 +65,8 @@
returning. Fixes #2431.
* Fix typo in net_would_block(). Fixes #528 reported by github-monoculture.
* Remove redundant include file in timing.c. Fixes #2640 reported by irwir.
+ * Fix build failure when building with mingw on Windows by including
+ stdarg.h where needed. Fixes #2656.
API Changes
* Extend the MBEDTLS_SSL_EXPORT_KEYS to export the handshake randbytes,
diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h
index 801a948..363d6b3 100644
--- a/include/mbedtls/platform.h
+++ b/include/mbedtls/platform.h
@@ -256,6 +256,7 @@
* the destination buffer is too short.
*/
#if defined(MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF)
+#include <stdarg.h>
/* For Older Windows (inc. MSYS2), we provide our own fixed implementation */
int mbedtls_platform_win32_vsnprintf( char *s, size_t n, const char *fmt, va_list arg );
#endif