From 14f7650b3e75f284b5028d6b2e2e99da34d175de Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Tue, 12 Sep 2017 13:00:22 +0300 Subject: [PATCH] libevent: fix path to file '/etc/hosts' --- packages/libevent/build.sh | 1 + packages/libevent/evdns.c.patch | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/libevent/build.sh b/packages/libevent/build.sh index 13f2b48d2..5ffaa1776 100755 --- a/packages/libevent/build.sh +++ b/packages/libevent/build.sh @@ -1,6 +1,7 @@ TERMUX_PKG_HOMEPAGE=http://libevent.org/ TERMUX_PKG_DESCRIPTION="Library that provides asynchronous event notification" TERMUX_PKG_VERSION=2.1.8 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/libevent/libevent/archive/release-${TERMUX_PKG_VERSION}-stable.tar.gz TERMUX_PKG_SHA256=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d # Strip away libevent core, extra and openssl libraries until someone uses them diff --git a/packages/libevent/evdns.c.patch b/packages/libevent/evdns.c.patch index cf8acb514..a2c95d97a 100644 --- a/packages/libevent/evdns.c.patch +++ b/packages/libevent/evdns.c.patch @@ -1,6 +1,6 @@ -diff -u -r ../libevent-release-2.1.8-stable/evdns.c ./evdns.c ---- ../libevent-release-2.1.8-stable/evdns.c 2017-01-26 00:37:15.000000000 +0100 -+++ ./evdns.c 2017-01-28 00:02:43.332229763 +0100 +diff -uNr libevent-release-2.1.8-stable/evdns.c libevent-release-2.1.8-stable.mod/evdns.c +--- libevent-release-2.1.8-stable/evdns.c 2017-01-26 01:37:15.000000000 +0200 ++++ libevent-release-2.1.8-stable.mod/evdns.c 2017-09-12 12:58:45.352988051 +0300 @@ -52,6 +52,9 @@ #include "evconfig-private.h" @@ -11,6 +11,15 @@ diff -u -r ../libevent-release-2.1.8-stable/evdns.c ./evdns.c #ifndef _FORTIFY_SOURCE #define _FORTIFY_SOURCE 3 +@@ -3602,7 +3605,7 @@ + evutil_snprintf(path_out, len_out, "%s%s", path, hostfile); + return path_out; + #else +- return mm_strdup("/etc/hosts"); ++ return mm_strdup("@TERMUX_PREFIX@/etc/hosts"); + #endif + } + @@ -3959,6 +3962,21 @@ int r; #ifdef _WIN32