summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/wincap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/wincap.cc')
-rw-r--r--winsup/cygwin/wincap.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index c7c9f2e37..313d7f986 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -276,6 +276,11 @@ wincapc::init ()
GetSystemInfo (&system_info);
version.dwOSVersionInfoSize = sizeof (RTL_OSVERSIONINFOEXW);
RtlGetVersion (&version);
+ /* Overwrite unreliable kernel version with correct values returned by
+ RtlGetNtVersionNumbers. See git log of this change for a description. */
+ RtlGetNtVersionNumbers (&version.dwMajorVersion,
+ &version.dwMinorVersion,
+ &version.dwBuildNumber);
switch (version.dwMajorVersion)
{