c-ares: Update from 1.13.0 to 1.14.0

This commit is contained in:
Fredrik Fornwall 2018-02-17 00:43:47 +01:00
parent 8bf71e91bb
commit 333eef6a7f
2 changed files with 85 additions and 5 deletions

View File

@ -1,6 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://c-ares.haxx.se
TERMUX_PKG_DESCRIPTION="C library for asynchronous DNS requests (including name resolves)"
TERMUX_PKG_VERSION=1.13.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://c-ares.haxx.se/download/c-ares-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=03f708f1b14a26ab26c38abd51137640cb444d3ec72380b21b20f1a8d2861da7
TERMUX_PKG_DESCRIPTION="Library for asynchronous DNS requests (including name resolves)"
TERMUX_PKG_VERSION=1.14.0
TERMUX_PKG_SHA256=45d3c1fd29263ceec2afc8ff9cd06d5f8f889636eb4e80ce3cc7f0eaf7aadc6e
TERMUX_PKG_SRCURL=https://c-ares.haxx.se/download/c-ares-${TERMUX_PKG_VERSION}.tar.gz
# Build with cmake to install cmake/c-ares/*.cmake files:
TERMUX_PKG_FORCE_CMAKE=yes
TERMUX_PKG_RM_AFTER_INSTALL="bin/"

View File

@ -0,0 +1,78 @@
diff -u -r ../c-ares-1.13.1-20180102/ares_android.c ./ares_android.c
--- ../c-ares-1.13.1-20180102/ares_android.c 2017-12-22 04:44:06.000000000 +0100
+++ ./ares_android.c 2018-01-03 01:56:59.552603162 +0100
@@ -12,7 +12,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
-#if defined(ANDROID) || defined(__ANDROID__)
+#if defined(__DISABLED_IN_TERMUX__)
#include <jni.h>
diff -u -r ../c-ares-1.13.1-20180102/ares_init.c ./ares_init.c
--- ../c-ares-1.13.1-20180102/ares_init.c 2017-12-21 04:44:05.000000000 +0100
+++ ./ares_init.c 2018-01-03 01:57:59.915887972 +0100
@@ -44,7 +44,6 @@
#if defined(ANDROID) || defined(__ANDROID__)
#include <sys/system_properties.h>
-#include "ares_android.h"
/* From the Bionic sources */
#define DNS_PROP_NAME_PREFIX "net.dns"
#define MAX_DNS_PROPERTIES 8
@@ -1618,29 +1617,6 @@
char **dns_servers;
size_t num_servers;
- /* Use the Android connectivity manager to get a list
- * of DNS servers. As of Android 8 (Oreo) net.dns#
- * system properties are no longer available. Google claims this
- * improves privacy. Apps now need the ACCESS_NETWORK_STATE
- * permission and must use the ConnectivityManager which
- * is Java only. */
- dns_servers = ares_get_android_server_list(MAX_DNS_PROPERTIES, &num_servers);
- if (dns_servers != NULL)
- {
- for (i = 0; i < num_servers; i++)
- {
- status = config_nameserver(&servers, &nservers, dns_servers[i]);
- if (status != ARES_SUCCESS)
- break;
- status = ARES_EOF;
- }
- for (i = 0; i < num_servers; i++)
- {
- ares_free(dns_servers[i]);
- }
- ares_free(dns_servers);
- }
-
# ifdef HAVE___SYSTEM_PROPERTY_GET
/* Old way using the system property still in place as
* a fallback. Older android versions can still use this.
diff -u -r ../c-ares-1.13.1-20180102/ares_library_init.c ./ares_library_init.c
--- ../c-ares-1.13.1-20180102/ares_library_init.c 2017-09-29 04:44:07.000000000 +0200
+++ ./ares_library_init.c 2018-01-03 01:56:59.552603162 +0100
@@ -30,10 +30,6 @@
fpGetBestRoute2_t ares_fpGetBestRoute2 = ZERO_NULL;
#endif
-#if defined(ANDROID) || defined(__ANDROID__)
-#include "ares_android.h"
-#endif
-
/* library-private global vars with source visibility restricted to this file */
static unsigned int ares_initialized;
@@ -164,10 +160,6 @@
if (ares_init_flags & ARES_LIB_INIT_WIN32)
ares_win32_cleanup();
-#if defined(ANDROID) || defined(__ANDROID__)
- ares_library_cleanup_android();
-#endif
-
ares_init_flags = ARES_LIB_INIT_NONE;
ares_malloc = malloc;
ares_realloc = realloc;