fix(main/libtorrent): prepend @TERMUX_PREFIX@ to discovered instance of /etc/resolv.conf

- Possibly fixes https://github.com/termux/termux-packages/issues/24853
This commit is contained in:
termux-pacman-bot
2026-02-08 12:48:58 +00:00
parent c780e5a73d
commit 6bcd5ccc01
2 changed files with 13 additions and 1 deletions

View File

@@ -3,11 +3,12 @@ TERMUX_PKG_DESCRIPTION="Libtorrent BitTorrent library"
TERMUX_PKG_MAINTAINER="Krishna Kanhaiya @kcubeterm"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION="0.16.6"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/rakshasa/libtorrent/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=720ff411ef0627a928141cad7f60b171a2fc44fb8700b0914e0072eab1a7be1b
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_DEPENDS="libc++, libcurl, openssl, zlib"
TERMUX_PKG_DEPENDS="libc++, libcurl, openssl, resolv-conf, zlib"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--enable-aligned=true
--without-fastcgi

View File

@@ -0,0 +1,11 @@
--- a/src/net/udns/udns_init.c
+++ b/src/net/udns/udns_init.c
@@ -147,7 +147,7 @@ static int dns_init_resolvconf(struct dns_ctx *ctx) {
int has_srch = 0;
/* read resolv.conf... */
- { int fd = open("/etc/resolv.conf", O_RDONLY);
+ { int fd = open("@TERMUX_PREFIX@/etc/resolv.conf", O_RDONLY);
if (fd >= 0) {
int l = read(fd, buf, sizeof(buf) - 1);
close(fd);