mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-10 11:50:52 +00:00
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:
@@ -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
|
||||
|
||||
11
packages/libtorrent/resolv-conf.patch
Normal file
11
packages/libtorrent/resolv-conf.patch
Normal 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);
|
||||
Reference in New Issue
Block a user