summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-04-24 17:12:16 +0200
committerCorinna Vinschen <corinna@vinschen.de>2017-04-24 17:12:16 +0200
commit63f19278b998b8145269662cc5a256020f6530bd (patch)
tree88218bb5536c509ec4d11c536eaa0baf82768864
parent3885c06c4f9ec813c0a649d3273a6b4ad14fedf2 (diff)
downloadcygnal-63f19278b998b8145269662cc5a256020f6530bd.tar.gz
cygnal-63f19278b998b8145269662cc5a256020f6530bd.tar.bz2
cygnal-63f19278b998b8145269662cc5a256020f6530bd.zip
cygwin: wincap: fix evaluation of build number
RtlGetNtVersionNumbers returns the build number with some upper bits set for no apparent reason. The fact that RtlGetNtVersionNumbers is undocumented doesn't exactly help. Just filter out the upper WORD for now. If build numbers are in danger to become 6 digit numbers, re-evaluate.
-rw-r--r--winsup/cygwin/wincap.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index cb52aad6f..c8799f3ec 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -118,6 +118,7 @@ wincapc::init ()
RtlGetNtVersionNumbers (&version.dwMajorVersion,
&version.dwMinorVersion,
&version.dwBuildNumber);
+ version.dwBuildNumber &= 0xffff;
switch (version.dwMajorVersion)
{