diff --git a/packages/c-ares/build.sh b/packages/c-ares/build.sh index 1f76c9068..023ef5fbc 100644 --- a/packages/c-ares/build.sh +++ b/packages/c-ares/build.sh @@ -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" diff --git a/packages/c-ares/hardcode-fallback-dns.patch b/packages/c-ares/hardcode-fallback-dns.patch new file mode 100644 index 000000000..826871599 --- /dev/null +++ b/packages/c-ares/hardcode-fallback-dns.patch @@ -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)