aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 71c5c2af46..be1714b207 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -184,8 +184,12 @@ void early_init(mparm_T *paramp)
ovi.dwOSVersionInfoSize = sizeof(ovi);
// Disable warning about GetVersionExA being deprecated. There doesn't seem to be a convenient
// replacement that doesn't add a ton of extra code as of writing this.
-# pragma warning(suppress : 4996)
+# ifdef _MSC_VER
+# pragma warning(suppress : 4996)
GetVersionEx(&ovi);
+# else
+ GetVersionEx(&ovi);
+# endif
snprintf(windowsVersion, sizeof(windowsVersion), "%d.%d",
(int)ovi.dwMajorVersion, (int)ovi.dwMinorVersion);
#endif