aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/vtls/schannel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index ab7d1c983..ebd1c1c04 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -285,8 +285,12 @@ get_alg_id_by_name(char *name)
#ifdef CALG_HMAC
CIPHEROPTION(CALG_HMAC);
#endif
-#if !defined(__W32API_VERSION) || defined(__MINGW64_VERSION_MAJOR)
- /* CALG_TLS1PRF has a syntax error in MinGW's w32api,
+#if !defined(__W32API_MAJOR_VERSION) || \
+ !defined(__W32API_MINOR_VERSION) || \
+ defined(__MINGW64_VERSION_MAJOR) || \
+ (__W32API_MAJOR_VERSION > 5) || \
+ ((__W32API_MAJOR_VERSION == 5) && (__W32API_MINOR_VERSION > 0))
+ /* CALG_TLS1PRF has a syntax error in MinGW's w32api up to version 5.0,
see https://osdn.net/projects/mingw/ticket/38391 */
CIPHEROPTION(CALG_TLS1PRF);
#endif