c-ares: do not look properties for fallback dns
They're working on old versions of Android only. Logcat: 04-10 20:50:22.854 22854 22854 E libc : Access denied finding property "net.dns1"
This commit is contained in:
parent
f36759a52b
commit
c44017b3cb
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://c-ares.haxx.se
|
||||
TERMUX_PKG_DESCRIPTION="Library for asynchronous DNS requests (including name resolves)"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_VERSION=1.16.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/c-ares/c-ares/archive/cares-${TERMUX_PKG_VERSION//./_}.tar.gz
|
||||
TERMUX_PKG_SHA256=b045ef78cda05edd4c677ab351f209315aab8fb041051031bdbe185aaf74baf3
|
||||
TERMUX_PKG_BREAKS="c-ares-dev"
|
||||
|
26
packages/c-ares/hardcode-fallback-dns.patch
Normal file
26
packages/c-ares/hardcode-fallback-dns.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff -uNr c-ares-cares-1_16_0/ares_init.c c-ares-cares-1_16_0.mod/ares_init.c
|
||||
--- c-ares-cares-1_16_0/ares_init.c 2020-03-12 18:58:05.000000000 +0200
|
||||
+++ c-ares-cares-1_16_0.mod/ares_init.c 2020-04-10 21:00:59.756808053 +0300
|
||||
@@ -1585,20 +1585,8 @@
|
||||
* We'll only run this if we don't have any dns servers
|
||||
* because this will get the same ones (if it works). */
|
||||
if (status != ARES_EOF) {
|
||||
- char propname[PROP_NAME_MAX];
|
||||
- char propvalue[PROP_VALUE_MAX]="";
|
||||
- for (i = 1; i <= MAX_DNS_PROPERTIES; i++) {
|
||||
- snprintf(propname, sizeof(propname), "%s%u", DNS_PROP_NAME_PREFIX, i);
|
||||
- if (__system_property_get(propname, propvalue) < 1) {
|
||||
- status = ARES_EOF;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- status = config_nameserver(&servers, &nservers, propvalue);
|
||||
- if (status != ARES_SUCCESS)
|
||||
- break;
|
||||
- status = ARES_EOF;
|
||||
- }
|
||||
+ config_nameserver(&servers, &nservers, "8.8.4.4");
|
||||
+ status = ARES_EOF;
|
||||
}
|
||||
# endif /* HAVE___SYSTEM_PROPERTY_GET */
|
||||
#elif defined(CARES_USE_LIBRESOLV)
|
Loading…
Reference in New Issue
Block a user