termux-packages/packages/gnupg2/dirmngr-dns.patch

43 lines
1.5 KiB
Diff

diff -u -r ../gnupg-2.1.22/dirmngr/dns.c ./dirmngr/dns.c
--- ../gnupg-2.1.22/dirmngr/dns.c 2017-07-25 09:37:05.000000000 +0200
+++ ./dirmngr/dns.c 2017-07-29 20:54:37.445647974 +0200
@@ -5424,7 +5424,7 @@
if (!(resconf = dns_resconf_open(&error)))
goto error;
- if ((error = dns_resconf_loadpath(resconf, "/etc/resolv.conf"))) {
+ if ((error = dns_resconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/resolv.conf"))) {
/*
* NOTE: Both the glibc and BIND9 resolvers ignore a missing
* /etc/resolv.conf, defaulting to a nameserver of
@@ -5436,7 +5436,7 @@
goto error;
}
- if ((error = dns_nssconf_loadpath(resconf, "/etc/nsswitch.conf"))) {
+ if ((error = dns_nssconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/nsswitch.conf"))) {
if (error != ENOENT)
goto error;
}
@@ -10407,7 +10407,7 @@
panic("dns_resconf_open: %s", dns_strerror(error));
if (!MAIN.resconf.count)
- MAIN.resconf.path[MAIN.resconf.count++] = "/etc/resolv.conf";
+ MAIN.resconf.path[MAIN.resconf.count++] = "@TERMUX_PREFIX@/etc/resolv.conf";
for (i = 0; i < MAIN.resconf.count; i++) {
path = MAIN.resconf.path[i];
diff -u -r ../gnupg-2.1.22/dirmngr/dns-stuff.c ./dirmngr/dns-stuff.c
--- ../gnupg-2.1.22/dirmngr/dns-stuff.c 2017-05-25 20:24:30.000000000 +0200
+++ ./dirmngr/dns-stuff.c 2017-07-29 20:54:00.414067929 +0200
@@ -114,7 +114,7 @@
#define DEFAULT_TIMEOUT 30
-#define RESOLV_CONF_NAME "/etc/resolv.conf"
+#define RESOLV_CONF_NAME "@TERMUX_PREFIX@/etc/resolv.conf"
/* Two flags to enable verbose and debug mode. */
static int opt_verbose;