Fix the build for mingw and CMake + VStudio
Changes to the build to add the new Win32 Crypto API's inadvertently broke
the build for mingw and Visual Studio builds when generated by CMake.
Signed-off-by: Simon Butcher <simon.butcher@arm.com>
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 136f60b..8fc8a52 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -61,7 +61,7 @@
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#if _MSC_VER <= 1600
+#if defined(_MSC_VER) && _MSC_VER <= 1600
/* Visual Studio 2010 and earlier issue a warning when both <stdint.h> and <intsafe.h> are included, as they
* redefine a number of <TYPE>_MAX constants. These constants are guaranteed to be the same, though, so
* we suppress the warning when including intsafe.h.
@@ -70,7 +70,7 @@
#pragma warning( disable : 4005 )
#endif
#include <intsafe.h>
-#if _MSC_VER <= 1600
+#if defined(_MSC_VER) && _MSC_VER <= 1600
#pragma warning( pop )
#endif
#else