Avoid Windows 8 Getversion deprecated errors.
[openssl.git] / crypto / cryptlib.c
index 049a7bba9195624c84e4eef2a2a90ee93de951a4..897b5b5bc22a551e6ad21d82a3b21b39a885e9ec 100644 (file)
@@ -357,7 +357,7 @@ void OPENSSL_showfatal (const char *fmta,...)
 
 #if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
     /* this -------------v--- guards NT-specific calls */
-    if (GetVersion() < 0x80000000 && OPENSSL_isservice() > 0)
+    if (check_winnt() && OPENSSL_isservice() > 0)
     {  HANDLE h = RegisterEventSource(0,_T("OPENSSL"));
        const TCHAR *pmsg=buf;
        ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0);