Defines for UEFI environment under MSVC added
diff --git a/library/x509.c b/library/x509.c
index 677760e..27040b9 100644
--- a/library/x509.c
+++ b/library/x509.c
@@ -54,12 +54,16 @@
 
 #include <string.h>
 #include <stdlib.h>
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
 #include <windows.h>
 #else
 #include <time.h>
 #endif
 
+#if defined(EFIX64) || defined(EFI32)
+#include <stdio.h>
+#endif
+
 #if defined(POLARSSL_FS_IO)
 #include <stdio.h>
 #if !defined(_WIN32)
@@ -425,7 +429,7 @@
 }
 #endif /* POLARSSL_FS_IO */
 
-#if defined _MSC_VER && !defined snprintf
+#if defined(_MSC_VER) && !defined snprintf
 #include <stdarg.h>
 
 #if !defined vsnprintf
@@ -620,7 +624,7 @@
     int year, mon, day;
     int hour, min, sec;
 
-#if defined(_WIN32)
+#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
     SYSTEMTIME st;
 
     GetLocalTime(&st);