[gnutls-devel] [PATCH 2/4] Set _WIN32_WINNT to 0x600, at least with some MinGW versions ncrypt.h checks this define to be at least 0x600.

Tim Kosse tim.kosse at filezilla-project.org
Sat Apr 18 11:38:55 CEST 2015


---
 lib/system-keys-win.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/system-keys-win.c b/lib/system-keys-win.c
index 992ec6d..6eb6446 100644
--- a/lib/system-keys-win.c
+++ b/lib/system-keys-win.c
@@ -18,6 +18,14 @@
  *
  */
 
+// Before including any Windows header we need to set _WIN32_WINNT to Vista
+// (or higher) so that the NCRYPT stuff can be used.
+#if _WIN32_WINNT < 0x600
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x600
+#endif
+
+
 #include <gnutls_int.h>
 #include <gnutls_errors.h>
 #include <gnutls/gnutls.h>
-- 
2.1.4




More information about the Gnutls-devel mailing list