c-ares: fix path to file '/etc/hosts'
authorLeonid Plyushch <leonid.plyushch@gmail.com>
Tue, 12 Sep 2017 10:30:39 +0000 (13:30 +0300)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 12 Sep 2017 12:18:48 +0000 (14:18 +0200)
packages/c-ares/build.sh
packages/c-ares/fix-path-etc-hosts.patch [new file with mode: 0644]

index 8a1a125..246d46a 100644 (file)
@@ -1,5 +1,6 @@
 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
diff --git a/packages/c-ares/fix-path-etc-hosts.patch b/packages/c-ares/fix-path-etc-hosts.patch
new file mode 100644 (file)
index 0000000..56ff163
--- /dev/null
@@ -0,0 +1,12 @@
+diff -uNr c-ares-1.13.0/ares_private.h c-ares-1.13.0.mod/ares_private.h
+--- c-ares-1.13.0/ares_private.h       2017-06-16 15:53:03.000000000 +0300
++++ c-ares-1.13.0.mod/ares_private.h   2017-09-12 11:24:17.332992105 +0300
+@@ -84,7 +84,7 @@
+ #ifdef ETC_INET
+ #define PATH_HOSTS              "/etc/inet/hosts"
+ #else
+-#define PATH_HOSTS              "/etc/hosts"
++#define PATH_HOSTS              "@TERMUX_PREFIX@/etc/hosts"
+ #endif
+ #endif