Commit ed263363 authored by Jason Madden's avatar Jason Madden Committed by GitHub

Merge pull request #1625 from gevent/issue1624

Update c-ares to 1.16.1
parents f24209c0 176e335a
......@@ -12,7 +12,7 @@ group: travis_latest
os:
- linux
- osx
osx_image: xcode11.3
osx_image: xcode11.4
env:
......
......@@ -17,7 +17,6 @@ import distutils.sysconfig # to get CFLAGS to pass into c-ares configure script
from _setuputils import WIN
from _setuputils import quoted_dep_abspath
from _setuputils import system
from _setuputils import make_universal_header
from _setuputils import should_embed
from _setuputils import LIBRARIES
from _setuputils import DEFINE_MACROS
......@@ -31,24 +30,24 @@ from _setuputils import get_include_dirs
CARES_EMBED = should_embed('c-ares')
# See #616, trouble building for a 32-bit python on a 64-bit platform
# (Linux).
_config_cflags = distutils.sysconfig.get_config_var("CFLAGS") or ''
cflags = _config_cflags + ((' ' + os.environ['CFLAGS']) if os.environ.get("CFLAGS") else '')
cflags = ('CFLAGS="%s"' % (cflags,)) if cflags else ''
# See #616, trouble building for a 32-bit python against a 64-bit platform
_config_vars = distutils.sysconfig.get_config_var("CFLAGS")
if _config_vars and "m32" in _config_vars:
_m32 = 'CFLAGS="' + os.getenv('CFLAGS', '') + ' -m32" '
else:
_m32 = ''
# Use -r, not -e, for support of old solaris. See
# https://github.com/gevent/gevent/issues/777
ares_configure_command = ' '.join([
"(cd ", quoted_dep_abspath('c-ares'),
" && if [ -r ares_build.h ]; then cp ares_build.h ares_build.h.orig; fi ",
" && sh ./configure --disable-dependency-tracking -C " + _m32 + "CONFIG_COMMANDS= ",
" && sh ./configure --disable-dependency-tracking -C " + cflags,
" && cp ares_config.h ares_build.h \"$OLDPWD\" ",
" && cat ares_build.h ",
" && if [ -r ares_build.h.orig ]; then mv ares_build.h.orig ares_build.h; fi)",
"> configure-output.txt"])
"> configure-output.txt"
])
......@@ -79,9 +78,6 @@ def configure_ares(bext, ext):
with open('configure-output.txt', 'r') as t:
print(t.read(), file=sys.stderr)
raise
if sys.platform == 'darwin':
make_universal_header('ares_build.h', 'CARES_SIZEOF_LONG')
make_universal_header('ares_config.h', 'SIZEOF_LONG', 'SIZEOF_SIZE_T', 'SIZEOF_TIME_T')
finally:
os.chdir(cwd)
......@@ -116,6 +112,10 @@ if CARES_EMBED:
ARES.define_macros += [('HAVE_CONFIG_H', '')]
if sys.platform != 'darwin':
ARES.libraries += ['rt']
else:
# libresolv dependency introduced in
# c-ares 1.16.1.
ARES.libraries += ['resolv']
ARES.define_macros += [('CARES_EMBED', '1')]
else:
ARES.libraries.append('cares')
......
......@@ -8,7 +8,6 @@ it shouldn't attempt to cythonize anything.
from __future__ import print_function, absolute_import, division
import sys
import os.path
from _setuputils import Extension
......@@ -17,7 +16,6 @@ from _setuputils import system
from _setuputils import dep_abspath
from _setuputils import quoted_dep_abspath
from _setuputils import WIN
from _setuputils import make_universal_header
from _setuputils import LIBRARIES
from _setuputils import DEFINE_MACROS
from _setuputils import glob_many
......@@ -55,9 +53,6 @@ def configure_libev(build_command=None, extension=None): # pylint:disable=unused
return
system(libev_configure_command)
if sys.platform == 'darwin':
make_universal_header(config_path,
'SIZEOF_LONG', 'SIZEOF_SIZE_T', 'SIZEOF_TIME_T')
def build_extension():
......
......@@ -135,24 +135,6 @@ def should_embed(dep_name):
## Headers
def make_universal_header(filename, *defines):
defines = [('#define %s ' % define, define) for define in defines]
with open(filename, 'r') as f:
lines = f.read().split('\n')
ifdef = 0
with open(filename, 'w') as f:
for line in lines:
if line.startswith('#ifdef'):
ifdef += 1
elif line.startswith('#endif'):
ifdef -= 1
elif not ifdef:
for prefix, define in defines:
if line.startswith(prefix):
line = '#ifdef __LP64__\n#define %s 8\n#else\n#define %s 4\n#endif' % (define, define)
break
print(line, file=f)
def get_include_dirs(*extra_paths):
"""
Return additional include directories that might be needed to
......
Changelog for the c-ares project. Generated with git2changes.pl
Version 1.16.1 (11 May 2020)
Brad House (11 May 2020)
- c-ares 1.16.1 release prep
- update travis to use xcode11.4
- Prevent possible double-free in ares_getaddrinfo() if ares_destroy() is called
In the event that ares_destroy() is called prior to ares_getaddrinfo() completing,
it would result in an invalid read and double-free due to calling end_hquery() twice.
Reported By: Jann Horn @ Google Project Zero
GitHub (30 Apr 2020)
- [shelley vohr brought this change]
fix: windows UNICODE incompatibilities with ares_getaddrinfo (#328)
Fixes the following compatibility issues:
* Use RegQueryValueExA instead of RegQueryValueEx
* Use ExpandEnvironmentStringsA instead of ExpandEnvironmentStrings
* Use RegOpenKeyExA instead of RegOpenKeyExA
* Use GetWindowsDirectoryA instead of GetWindowsDirectoryA
Fix By: Shelley Vohr (@codebytere)
Closes: #327
Brad House (13 Apr 2020)
- travis: CloudFlare does not allow T_ANY requests, so live tests that use it fail. Disable.
- travis: bump macos image to the latest
- cast-align warnings are false for struct sockaddr, silence
Create a macro to silence false cast-align warnings when casting
struct sockaddr * to struct sockaddr_in * and struct sockaddr_in6 *.
Fix By: Brad House (@bradh352)
- MacOS: Enable libresolv support for retrieving DNS servers like iOS does.
GitHub (10 Apr 2020)
- [Dmitry Igrishin brought this change]
CMake: Populate the INCLUDE_DIRECTORIES property of installed targets (#323)
Populate the INCLUDE_DIRECTORIES property of installed targets
Fix By: Dmitry Igrishin (@dmitigr)
Brad House (10 Apr 2020)
- travis: make valgrind use cmake for tests
- dont try to use libtool to run valgrind
- valgrind requires libtool installed to wrap tests
- scan build 7
- fix travis live test
- add debug for travis
- try without sudo
- attempt to modernize travis build environment
GitHub (6 Apr 2020)
- [Teemu R brought this change]
Allow TXT records on CHAOS qclass (#321)
Some DNS servers intentionally "misuse" the obsoleted CHAOS (CH) qclass to provide things like `version.bind`, `version.server`, `authors.bind`, `hostname.bind` and `id.server`.
C-ares was not allowing such use cases.
Fix By: Teemu R. (@rytilahti)
Brad House (5 Apr 2020)
- Remove warnings from ares_getaddrinfo.3 man page
As reported in #319, non-standard macros of .IN were used.
Replace with .RS/.RE.
Fixes: #319
Fix By: Brad House (@bradh352)
- ares_getaddrinfo man page render better for man2html
- update man pages to render better for man2html
Version 1.16.0 (12 Mar 2020)
Brad House (12 Mar 2020)
......@@ -4629,45 +4721,3 @@ Daniel Stenberg (1 May 2009)
Yang Tse (1 May 2009)
- David McCreedy's "TPF-platform specific changes to various files" patch
- Check definition of _XOPEN_SOURCE_EXTENDED with the compiler
- Check if X/Open network library is required
- cope with ares_build.h and ares_rules.h follow-up
- Added some notes regarding ares_build.h
- fix EOL
- fix EOL
- cope with ares_build.h and ares_rules.h
- buildconf.bat for CVS-tree c-ares
- Use 'unsigned int' instead of size_t attempting to avoid header inclusion
- NetWare LibC's getpeername() third argument data type is size_t
- Remove temporary debug tracing for ares_socklen_t Windows targets
- ares_socklen_t follow-up
- ares_build.h Windows follow-up
- Add temporary debug tracing for ares_socklen_t Windows targets
- ares_build.h NetWare follow-up
- ares_build.h NetWare attempt
- Initial step towards a configure time ares_socklen_t definition
- ignore stamp-h*
- Added CARES_INCLUDES_SYS_TYPES
- Initial step towards a configure time curl_socklen_t definition
- avoid use of alloca()
......@@ -69,7 +69,7 @@ DIST_SUBDIRS = test
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcares.pc
CARES_VERSION_INFO = -version-info 6:0:4
CARES_VERSION_INFO = -version-info 6:1:4
# This flag accepts an argument of the form current[:revision[:age]]. So,
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
# 1.
......
c-ares version 1.16.0
c-ares version 1.16.1
Security:
o Prevent possible use-after-free and double-free in ares_getaddrinfo() if
ares_destroy() is called prior to ares_getaddrinfo() completing. Reported
by Jann Horn at Google Project Zero.
Changes:
o Introduction of ares_getaddrinfo() API which provides similar output
(including proper sorting as per RFC 6724) to the system native API, but
utilizes different data structures in order to provide additional information
such as TTLs and all aliases. Please reference the respective man pages for
usage details. [3] [4] [5] [7] [8] [13] [14] [15] [16] [17] [22]
o Parse SOA records from ns_t_any response [29] [30]
o CMake: Provide c-ares version in package export file [24]
o CMake: Add CPACK functionality for DEB and RPM [28]
o CMake: Generate PDB files during build [33] [34]
o CMake: Support manpage installation [37] [38]
o Allow TXT records on CHAOS qclass. Used for retriving things like
version.bind, version.server, authoris.bind, hostname.bind, and id.server.
[3]
Bug fixes:
o Fix bad expectation in IPv6 localhost test. [1] [2]
o AutoTools: use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS to prevent
complaints about CPPFLAGS in CFLAGS. [6]
o Fix .onion handling
o Command line usage was out of date for adig and ahost. [18]
o Typos in manpages [19] [20]
o If ares_getenv is defined, it must return a value on all platforms [21]
o If /etc/resolv.conf has invalid lookup values, use the defaults. [23]
o Tests: Separate live tests from SetServers* tests as only live tests should
require internet access. [25]
o ares_gethostbyname() should return ENODATA if no valid A or AAAA record is
found, but a CNAME was found. [26] [27]
o CMake: Rework library function checking to prevent unintended linking with
system libraries that aren't needed. [31] [32]
o Due to use of inet_addr() it was not possible to return 255.255.255.255 from
ares_gethostbyname(). [35] [36]
o CMake: Fix building of tests on Windows
o Fix Windows Unicode incompatibilities with ares_getaddrinfo() [1]
o Silence false cast-align compiler warnings due to valid casts of
struct sockaddr to struct sockaddr_in and struct sockaddr_in6.
o MacOS should use libresolv for retrieving DNS servers, like iOS
o CMake build system should populate the INCLUDE_DIRECTORIES property of
installed targets [2]
o Correct macros in use for the ares_getaddrinfo.3 man page
Thanks go to these friendly people for their efforts and contributions:
Abhishek Arya (@inferno-chromium), Adam Majer (@AdamMajer),
Andrew Selivanov (@ki11roy), Ben Noordhuis (@bnoordhuis),
Brad House (@bradh352), Christian Ammer (@ChristianAmmer), Dan Noé (@dnoe),
Daniel Stenberg (@bagder), Darrin Cullop (@dwcullop),
Dron Rathore (@DronRathore), Fabrice Fontaine (@ffontaine),
Gregor Jasny (@gjasny), @kedixa, Khaidi Chu (@XadillaX),
Kyle Edwards (@KyleFromKitware), @lifenjoiner, Michal Rostecki (@mrostecki),
Peter Eisentraut (@petere), Piotr Pietraszkiewicz (@ppietrasa),
Stephen Bryant (@bf-bryants), @tjwalton, Vy Nguyen (@oontvoo)
(22 contributors)
Brad House (@bradh352), Daniel Stenberg (@bagder), Dmitry Igrishin (@dmitigr),
Jann Horn, Shelly Vohr, Teemu R (@rytilahti)
(6 contributors)
References to bug reports and discussions on issues:
[1] = https://github.com/c-ares/c-ares/pull/227
[2] = https://github.com/c-ares/c-ares/issues/85
[3] = https://github.com/c-ares/c-ares/pull/112
[4] = https://github.com/c-ares/c-ares/pull/233
[5] = https://github.com/c-ares/c-ares/pull/234
[6] = https://github.com/c-ares/c-ares/pull/236
[7] = https://github.com/c-ares/c-ares/pull/235
[8] = https://github.com/c-ares/c-ares/pull/239
[9] = https://github.com/c-ares/c-ares/pull/241
[10] = https://github.com/c-ares/c-ares/pull/187
[11] = https://github.com/c-ares/c-ares/pull/252
[12] = https://github.com/c-ares/c-ares/issues/251
[13] = https://github.com/c-ares/c-ares/pull/258
[14] = https://github.com/c-ares/c-ares/pull/257
[15] = https://github.com/c-ares/c-ares/pull/262
[16] = https://github.com/c-ares/c-ares/pull/264
[17] = https://github.com/c-ares/c-ares/pull/265
[18] = https://github.com/c-ares/c-ares/pull/256
[19] = https://github.com/c-ares/c-ares/pull/269
[20] = https://github.com/c-ares/c-ares/pull/275
[21] = https://github.com/c-ares/c-ares/pull/279
[22] = https://github.com/c-ares/c-ares/pull/290
[23] = https://github.com/c-ares/c-ares/pull/274
[24] = https://github.com/c-ares/c-ares/pull/296
[25] = https://github.com/c-ares/c-ares/pull/299
[26] = https://github.com/c-ares/c-ares/pull/304
[27] = https://github.com/c-ares/c-ares/issues/303
[28] = https://github.com/c-ares/c-ares/pull/283
[29] = https://github.com/c-ares/c-ares/pull/103
[30] = https://github.com/c-ares/c-ares/issues/102
[31] = https://github.com/c-ares/c-ares/pull/310
[32] = https://github.com/c-ares/c-ares/issues/307
[33] = https://github.com/c-ares/c-ares/pull/311
[34] = https://github.com/c-ares/c-ares/issues/245
[35] = https://github.com/c-ares/c-ares/issues/309
[36] = https://github.com/c-ares/c-ares/pull/312
[37] = https://github.com/c-ares/c-ares/issues/297
[38] = https://github.com/c-ares/c-ares/pull/314
[1] = https://github.com/c-ares/c-ares/pull/328
[2] = https://github.com/c-ares/c-ares/pull/323
[3] = https://github.com/c-ares/c-ares/pull/321
......@@ -69,6 +69,11 @@
#define INADDR_NONE 0xffffffff
#endif
/* By using a double cast, we can get rid of the bogus warning of
* warning: cast from 'const struct sockaddr *' to 'const struct sockaddr_in6 *' increases required alignment from 1 to 4 [-Wcast-align]
*/
#define CARES_INADDR_CAST(type, var) ((type)((void *)var))
static const char *usage = "acountry [-?hdv] {host|addr} ...\n";
static const char nerd_fmt[] = "%u.%u.%u.%u.zz.countries.nerd.dk";
static const char *nerd_ver1 = nerd_fmt + 14; /* .countries.nerd.dk */
......@@ -233,7 +238,7 @@ static void callback(void *arg, int status, int timeouts, struct hostent *host)
if (!cname)
printf("Failed to get CNAME for %s\n", name);
else
find_country_from_cname(cname, *(struct in_addr*)host->h_addr);
find_country_from_cname(cname, *(CARES_INADDR_CAST(struct in_addr *, host->h_addr)));
}
/*
......
......@@ -85,11 +85,12 @@ struct addrinfo_sort_elem
#define ARES_IN6_IS_ADDR_6BONE(a) \
(((a)->s6_addr[0] == 0x3f) && ((a)->s6_addr[1] == 0xfe))
static int get_scope(const struct sockaddr *addr)
{
if (addr->sa_family == AF_INET6)
{
const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6 *)addr;
const struct sockaddr_in6 *addr6 = CARES_INADDR_CAST(const struct sockaddr_in6 *, addr);
if (IN6_IS_ADDR_MULTICAST(&addr6->sin6_addr))
{
return ARES_IPV6_ADDR_MC_SCOPE(&addr6->sin6_addr);
......@@ -114,7 +115,7 @@ static int get_scope(const struct sockaddr *addr)
}
else if (addr->sa_family == AF_INET)
{
const struct sockaddr_in *addr4 = (const struct sockaddr_in *)addr;
const struct sockaddr_in *addr4 = CARES_INADDR_CAST(const struct sockaddr_in *, addr);
unsigned long int na = ntohl(addr4->sin_addr.s_addr);
if (ARES_IN_LOOPBACK(na) || /* 127.0.0.0/8 */
(na & 0xffff0000) == 0xa9fe0000) /* 169.254.0.0/16 */
......@@ -149,7 +150,7 @@ static int get_label(const struct sockaddr *addr)
}
else if (addr->sa_family == AF_INET6)
{
const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6 *)addr;
const struct sockaddr_in6 *addr6 = CARES_INADDR_CAST(const struct sockaddr_in6 *, addr);
if (IN6_IS_ADDR_LOOPBACK(&addr6->sin6_addr))
{
return 0;
......@@ -210,7 +211,7 @@ static int get_precedence(const struct sockaddr *addr)
}
else if (addr->sa_family == AF_INET6)
{
const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6 *)addr;
const struct sockaddr_in6 *addr6 = CARES_INADDR_CAST(const struct sockaddr_in6 *, addr);
if (IN6_IS_ADDR_LOOPBACK(&addr6->sin6_addr))
{
return 50;
......@@ -353,10 +354,10 @@ static int rfc6724_compare(const void *ptr1, const void *ptr2)
{
const struct sockaddr_in6 *a1_src = &a1->src_addr.sa6;
const struct sockaddr_in6 *a1_dst =
(const struct sockaddr_in6 *)a1->ai->ai_addr;
CARES_INADDR_CAST(const struct sockaddr_in6 *, a1->ai->ai_addr);
const struct sockaddr_in6 *a2_src = &a2->src_addr.sa6;
const struct sockaddr_in6 *a2_dst =
(const struct sockaddr_in6 *)a2->ai->ai_addr;
CARES_INADDR_CAST(const struct sockaddr_in6 *, a2->ai->ai_addr);
prefixlen1 = common_prefix_len(&a1_src->sin6_addr, &a1_dst->sin6_addr);
prefixlen2 = common_prefix_len(&a2_src->sin6_addr, &a2_dst->sin6_addr);
if (prefixlen1 != prefixlen2)
......
......@@ -408,11 +408,11 @@ static void end_hquery(struct host_query *hquery, int status)
{
if (next->ai_family == AF_INET)
{
((struct sockaddr_in *)next->ai_addr)->sin_port = htons(hquery->port);
(CARES_INADDR_CAST(struct sockaddr_in *, next->ai_addr))->sin_port = htons(hquery->port);
}
else
{
((struct sockaddr_in6 *)next->ai_addr)->sin6_port = htons(hquery->port);
(CARES_INADDR_CAST(struct sockaddr_in6 *, next->ai_addr))->sin6_port = htons(hquery->port);
}
next = next->ai_next;
}
......@@ -456,18 +456,18 @@ static int file_lookup(struct host_query *hquery)
char tmp[MAX_PATH];
HKEY hkeyHosts;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ,
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, WIN_NS_NT_KEY, 0, KEY_READ,
&hkeyHosts) == ERROR_SUCCESS)
{
DWORD dwLength = MAX_PATH;
RegQueryValueEx(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
RegQueryValueExA(hkeyHosts, DATABASEPATH, NULL, NULL, (LPBYTE)tmp,
&dwLength);
ExpandEnvironmentStrings(tmp, PATH_HOSTS, MAX_PATH);
ExpandEnvironmentStringsA(tmp, PATH_HOSTS, MAX_PATH);
RegCloseKey(hkeyHosts);
}
}
else if (platform == WIN_9X)
GetWindowsDirectory(PATH_HOSTS, MAX_PATH);
GetWindowsDirectoryA(PATH_HOSTS, MAX_PATH);
else
return ARES_ENOTFOUND;
......@@ -548,6 +548,7 @@ static void host_callback(void *arg, int status, int timeouts,
else if (status == ARES_EDESTRUCTION)
{
end_hquery(hquery, status);
return;
}
if (!hquery->remaining)
......
......@@ -92,13 +92,13 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
if ((sa->sa_family == AF_INET) &&
(salen == sizeof(struct sockaddr_in)))
{
addr = (struct sockaddr_in *)sa;
addr = CARES_INADDR_CAST(struct sockaddr_in *, sa);
port = addr->sin_port;
}
else if ((sa->sa_family == AF_INET6) &&
(salen == sizeof(struct sockaddr_in6)))
{
addr6 = (struct sockaddr_in6 *)sa;
addr6 = CARES_INADDR_CAST(struct sockaddr_in6 *, sa);
port = addr6->sin6_port;
}
else
......
......@@ -163,7 +163,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
{
hostent->h_addr_list[i] = (char *)&addrs[i];
memcpy(hostent->h_addr_list[i],
&(((struct sockaddr_in *)next->ai_addr)->sin_addr),
&(CARES_INADDR_CAST(struct sockaddr_in *, next->ai_addr)->sin_addr),
sizeof(struct in_addr));
if (naddrttls && i < *naddrttls)
{
......@@ -173,7 +173,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
addrttls[i].ttl = next->ai_ttl;
memcpy(&addrttls[i].ipaddr,
&(((struct sockaddr_in *)next->ai_addr)->sin_addr),
&(CARES_INADDR_CAST(struct sockaddr_in *, next->ai_addr)->sin_addr),
sizeof(struct in_addr));
}
++i;
......
......@@ -165,7 +165,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
{
hostent->h_addr_list[i] = (char*)&addrs[i];
memcpy(hostent->h_addr_list[i],
&(((struct sockaddr_in6 *)next->ai_addr)->sin6_addr),
&(CARES_INADDR_CAST(struct sockaddr_in6 *, next->ai_addr)->sin6_addr),
sizeof(struct ares_in6_addr));
if (naddrttls && i < *naddrttls)
{
......@@ -175,7 +175,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
addrttls[i].ttl = next->ai_ttl;
memcpy(&addrttls[i].ip6addr,
&(((struct sockaddr_in6 *)next->ai_addr)->sin6_addr),
&(CARES_INADDR_CAST(struct sockaddr_in6 *, next->ai_addr)->sin6_addr),
sizeof(struct ares_in6_addr));
}
++i;
......
......@@ -113,7 +113,7 @@ ares__parse_txt_reply (const unsigned char *abuf, int alen,
}
/* Check if we are really looking at a TXT record */
if (rr_class == C_IN && rr_type == T_TXT)
if ((rr_class == C_IN || rr_class == C_CHAOS) && rr_type == T_TXT)
{
/*
* There may be multiple substrings in a single TXT record. Each
......
......@@ -50,6 +50,11 @@
#define STATIC_TESTABLE static
#endif
/* By using a double cast, we can get rid of the bogus warning of
* warning: cast from 'const struct sockaddr *' to 'const struct sockaddr_in6 *' increases required alignment from 1 to 4 [-Wcast-align]
*/
#define CARES_INADDR_CAST(type, var) ((type)((void *)var))
#if defined(WIN32) && !defined(WATT32)
#define WIN_NS_9X "System\\CurrentControlSet\\Services\\VxD\\MSTCP"
......
......@@ -1337,13 +1337,13 @@ static int same_address(struct sockaddr *sa, struct ares_addr *aa)
{
case AF_INET:
addr1 = &aa->addrV4;
addr2 = &((struct sockaddr_in *)sa)->sin_addr;
addr2 = &(CARES_INADDR_CAST(struct sockaddr_in *, sa))->sin_addr;
if (memcmp(addr1, addr2, sizeof(aa->addrV4)) == 0)
return 1; /* match */
break;
case AF_INET6:
addr1 = &aa->addrV6;
addr2 = &((struct sockaddr_in6 *)sa)->sin6_addr;
addr2 = &(CARES_INADDR_CAST(struct sockaddr_in6 *, sa))->sin6_addr;
if (memcmp(addr1, addr2, sizeof(aa->addrV6)) == 0)
return 1; /* match */
break;
......
......@@ -7,11 +7,11 @@
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 16
#define ARES_VERSION_PATCH 0
#define ARES_VERSION_PATCH 1
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.16.0"
#define ARES_VERSION_STR "1.16.1"
#if (ARES_VERSION >= 0x010700)
# define CARES_HAVE_ARES_LIBRARY_INIT 1
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for c-ares 1.16.0.
# Generated by GNU Autoconf 2.69 for c-ares 1.16.1.
#
# Report bugs to <c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares>.
#
......@@ -824,8 +824,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='c-ares'
PACKAGE_TARNAME='c-ares'
PACKAGE_VERSION='1.16.0'
PACKAGE_STRING='c-ares 1.16.0'
PACKAGE_VERSION='1.16.1'
PACKAGE_STRING='c-ares 1.16.1'
PACKAGE_BUGREPORT='c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares'
PACKAGE_URL=''
......@@ -1619,7 +1619,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures c-ares 1.16.0 to adapt to many kinds of systems.
\`configure' configures c-ares 1.16.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1690,7 +1690,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of c-ares 1.16.0:";;
short | recursive ) echo "Configuration of c-ares 1.16.1:";;
esac
cat <<\_ACEOF
......@@ -1831,7 +1831,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
c-ares configure 1.16.0
c-ares configure 1.16.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -2412,7 +2412,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by c-ares $as_me 1.16.0, which was
It was created by c-ares $as_me 1.16.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3521,7 +3521,7 @@ fi
fi
# List of supported lcov versions.
lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"
lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.13"
# Extract the first word of "lcov", so it can be a program name with args.
set dummy lcov; ac_word=$2
......@@ -5947,7 +5947,7 @@ fi
# Define the identity of the package.
PACKAGE='c-ares'
VERSION='1.16.0'
VERSION='1.16.1'
cat >>confdefs.h <<_ACEOF
......@@ -22477,31 +22477,6 @@ fi
if test "x$host_vendor" = "xapple"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iPhone target" >&5
$as_echo_n "checking for iPhone target... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "TargetConditionals.h"
int main (void)
{
#if TARGET_OS_IPHONE == 0
#error Not an iPhone target
#endif
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_servicename" >&5
$as_echo_n "checking for library containing res_servicename... " >&6; }
if ${ac_cv_search_res_servicename+:} false; then :
......@@ -22564,14 +22539,6 @@ else
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
......@@ -32576,7 +32543,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by c-ares $as_me 1.16.0, which was
This file was extended by c-ares $as_me 1.16.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -32642,7 +32609,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
c-ares config.status 1.16.0
c-ares config.status 1.16.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
AC_PREREQ(2.57)
AC_INIT([c-ares], [1.16.0],
AC_INIT([c-ares], [1.16.1],
[c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares])
XC_OVR_ZZ50
......@@ -354,28 +354,13 @@ if test "$HAVE_GETHOSTBYNAME" != "1"; then
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
fi
dnl resolv lib for iPhone
dnl resolv lib for Apple (MacOS and iOS)
AS_IF([test "x$host_vendor" = "xapple"], [
AC_MSG_CHECKING([for iPhone target])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include "TargetConditionals.h"
]], [[
#if TARGET_OS_IPHONE == 0
#error Not an iPhone target
#endif
return 0;
]])
],[
AC_MSG_RESULT([yes])
AC_SEARCH_LIBS([res_servicename], [resolv], [
AC_DEFINE([CARES_USE_LIBRESOLV], [1], [Use resolver library to configure cares])
], [
AC_MSG_ERROR([Unable to find libresolv which is required for iPhone targets])
])
],[
AC_MSG_RESULT([no])
])
])
dnl resolve lib?
......
......@@ -104,7 +104,7 @@ AC_DEFUN([AX_CODE_COVERAGE],[
])
# List of supported lcov versions.
lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"
lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.13"
AC_CHECK_PROG([LCOV], [lcov], [lcov])
AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
......
diff --git a/deps/c-ares/Makefile.in b/deps/c-ares/Makefile.in
index 28d12c03..b6e9d95d 100644
index 33a6f627..ad201713 100644
--- a/deps/c-ares/Makefile.in
+++ b/deps/c-ares/Makefile.in
@@ -731,61 +731,7 @@ HHEADERS = ares.h \
@@ -746,63 +746,7 @@ HHEADERS = ares.h \
ares_setup.h \
setup_once.h
......@@ -17,8 +17,10 @@ index 28d12c03..b6e9d95d 100644
- ares_free_data.3 \
- ares_free_hostent.3 \
- ares_free_string.3 \
- ares_freeaddrinfo.3 \
- ares_get_servers.3 \
- ares_get_servers_ports.3 \
- ares_getaddrinfo.3 \
- ares_gethostbyaddr.3 \
- ares_gethostbyname.3 \
- ares_gethostbyname_file.3 \
......@@ -66,10 +68,10 @@ index 28d12c03..b6e9d95d 100644
HTMLPAGES = ares_cancel.html \
ares_create_query.html \
diff --git a/deps/c-ares/Makefile.inc b/deps/c-ares/Makefile.inc
index 30e00461..d2701c83 100644
index f65df1f5..1499168a 100644
--- a/deps/c-ares/Makefile.inc
+++ b/deps/c-ares/Makefile.inc
@@ -75,61 +75,7 @@ HHEADERS = ares.h \
@@ -80,63 +80,7 @@ HHEADERS = ares.h \
ares_setup.h \
setup_once.h
......@@ -84,8 +86,10 @@ index 30e00461..d2701c83 100644
- ares_free_data.3 \
- ares_free_hostent.3 \
- ares_free_string.3 \
- ares_freeaddrinfo.3 \
- ares_get_servers.3 \
- ares_get_servers_ports.3 \
- ares_getaddrinfo.3 \
- ares_gethostbyaddr.3 \
- ares_gethostbyname.3 \
- ares_gethostbyname_file.3 \
......
Update bundled c-ares from 1.16.0 to 1.16.1.
On macOS, stop trying to adjust c-ares headers to make them
universal.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment