Skip to content

Commit

Permalink
win: remove deprecated GetVersionExW call (libuv#4486)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere authored Aug 14, 2024
1 parent 2713454 commit 31d9165
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/win/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,20 +1535,7 @@ int uv_os_uname(uv_utsname_t* buffer) {
os_info.dwOSVersionInfoSize = sizeof(os_info);
os_info.szCSDVersion[0] = L'\0';

/* Try calling RtlGetVersion(), and fall back to the deprecated GetVersionEx()
if RtlGetVersion() is not available. */
if (pRtlGetVersion) {
pRtlGetVersion(&os_info);
} else {
/* Silence GetVersionEx() deprecation warning. */
#ifdef _MSC_VER
#pragma warning(suppress : 4996)
#endif
if (GetVersionExW(&os_info) == 0) {
r = uv_translate_sys_error(GetLastError());
goto error;
}
}
pRtlGetVersion(&os_info);

/* Populate the version field. */
version_size = 0;
Expand Down

0 comments on commit 31d9165

Please sign in to comment.