From 0184bcd56deaf8e915260f8dc4bc02a18a6a048d Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Sat, 11 Jan 2020 05:43:40 +0000 Subject: [PATCH] build: silence c-ares Windows compiler warnings Silence the following compiler warning on Windows: `inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings` PR-URL: https://github.com/nodejs/node/pull/31311 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- deps/cares/cares.gyp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/cares/cares.gyp b/deps/cares/cares.gyp index be7931f7743db1..0b5cd02c21dde1 100644 --- a/deps/cares/cares.gyp +++ b/deps/cares/cares.gyp @@ -112,7 +112,10 @@ 'defines': [ 'CARES_BUILDING_LIBRARY' ] }], [ 'OS=="win"', { - 'defines': [ 'CARES_PULL_WS2TCPIP_H=1' ], + 'defines': [ + 'CARES_PULL_WS2TCPIP_H=1', + '_WINSOCK_DEPRECATED_NO_WARNINGS', + ], 'include_dirs': [ 'config/win32' ], 'sources': [ 'src/config-win32.h',