From b0b7afcfbe0f38715af062ebcb9e1c6bbc68ba68 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 11 Apr 2018 21:34:43 +1000 Subject: deps: upgrade to c-ares v1.14.0 * Fix patch for CVE-2017-1000381 to not be overly aggressive. * win32: Preserve DNS server order returned by Windows when sorting and exclude DNS servers in legacy subnets. * win32: Support most recent Visual Studio 2017. * gethostbyaddr should fail with ECANCELLED not ENOTFOUND when ares_cancel is called. * win32: Exclude legacy ipv6 subnets. * android: Applications compiled for Oreo can no longer use __system_property_get and must use Java calls to retrieve DNS servers. * win32: Force use of ANSI functions. * CMake minimum version is now 3.1. * ares_gethostbyname.3: fix callback status values. * docs: Document WSAStartup requirement. * Fix a typo in init_by_resolv_conf. * Android JNI code leaks local references in some cases. * Force using the ANSI versions of WinAPI functions. The most important changes have already been included via * 50e580df21 deps: cherry-pick 0ef4a0c64b6 from c-ares upstream * 9a0631dffe deps: cherry-pick 18ea996 from c-ares upstream PR-URL: https://github.com/nodejs/node/pull/19939 Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- deps/cares/include/ares.h | 10 ++++++++++ deps/cares/include/ares_build.h | 12 +++++------- deps/cares/include/ares_version.h | 6 +++--- 3 files changed, 18 insertions(+), 10 deletions(-) (limited to 'deps/cares/include') diff --git a/deps/cares/include/ares.h b/deps/cares/include/ares.h index cfd72b0c51..65a82cb5b7 100644 --- a/deps/cares/include/ares.h +++ b/deps/cares/include/ares.h @@ -68,6 +68,10 @@ # include #endif +#if defined(ANDROID) || defined(__ANDROID__) +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -307,6 +311,12 @@ CARES_EXTERN int ares_library_init_mem(int flags, void (*afree)(void *ptr), void *(*arealloc)(void *ptr, size_t size)); +#if defined(ANDROID) || defined(__ANDROID__) +CARES_EXTERN void ares_library_init_jvm(JavaVM *jvm); +CARES_EXTERN int ares_library_init_android(jobject connectivity_manager); +CARES_EXTERN int ares_library_android_initialized(void); +#endif + CARES_EXTERN int ares_library_initialized(void); CARES_EXTERN void ares_library_cleanup(void); diff --git a/deps/cares/include/ares_build.h b/deps/cares/include/ares_build.h index f5535b3849..5e3ba9f0d8 100644 --- a/deps/cares/include/ares_build.h +++ b/deps/cares/include/ares_build.h @@ -194,16 +194,14 @@ /* Data type definition of ares_ssize_t. */ #ifdef _WIN32 # ifdef _WIN64 - typedef __int64 ares_ssize_t; +# define CARES_TYPEOF_ARES_SSIZE_T __int64 # else - typedef long ares_ssize_t; +# define CARES_TYPEOF_ARES_SSIZE_T long # endif #else -# ifdef CARES_TYPEOF_ARES_SSIZE_T - typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t; -# else - typedef ssize_t ares_ssize_t; -# endif +# define CARES_TYPEOF_ARES_SSIZE_T ssize_t #endif +typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t; + #endif /* __CARES_BUILD_H */ diff --git a/deps/cares/include/ares_version.h b/deps/cares/include/ares_version.h index afa46c632f..61b2b98a8d 100644 --- a/deps/cares/include/ares_version.h +++ b/deps/cares/include/ares_version.h @@ -3,15 +3,15 @@ #define ARES__VERSION_H /* This is the global package copyright */ -#define ARES_COPYRIGHT "2004 - 2016 Daniel Stenberg, ." +#define ARES_COPYRIGHT "2004 - 2017 Daniel Stenberg, ." #define ARES_VERSION_MAJOR 1 -#define ARES_VERSION_MINOR 13 +#define ARES_VERSION_MINOR 14 #define ARES_VERSION_PATCH 0 #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ (ARES_VERSION_MINOR<<8)|\ (ARES_VERSION_PATCH)) -#define ARES_VERSION_STR "1.13.0" +#define ARES_VERSION_STR "1.14.0" #if (ARES_VERSION >= 0x010700) # define CARES_HAVE_ARES_LIBRARY_INIT 1 -- cgit v1.2.3