Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/cares_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@
# define AI_V4MAPPED 0
#endif

// Suppress c-ares deprecation warnings. c-ares has deprecated many legacy
// APIs (ares_parse_*_reply, ares_get_servers_ports, ares_set_servers_ports,
// etc.) in favor of ares_dns_parse, ares_get_servers_csv, and
// ares_set_servers_csv. A full migration is tracked separately; this pragma
// silences the build warnings until that work is complete.
// TODO(omghante): Migrate to the replacement c-ares APIs.
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(disable : 4996)
#endif

namespace node {
namespace cares_wrap {
Expand Down
Loading