win,nfc: use #pragma warnings() for MSVC only
PR-URL: https://github.com/libuv/libuv/pull/2854 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Anna Henningsen <github@addaleax.net>
This commit is contained in:
parent
f6e74b1e41
commit
ffca3fb77b
@ -1806,7 +1806,9 @@ int uv_os_uname(uv_utsname_t* buffer) {
|
||||
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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user