35e78d94b8a2145dfd41ca72e972b6bd2c3d2821
[termux-packages] / packages / gnupg2 / dirmngr-dns.patch
1 diff -u -r ../gnupg-2.1.21/dirmngr/dns.c ./dirmngr/dns.c
2 --- ../gnupg-2.1.21/dirmngr/dns.c 2017-05-15 14:13:22.000000000 +0200
3 +++ ./dirmngr/dns.c 2017-05-18 14:02:06.625275461 +0200
4 @@ -5414,7 +5414,7 @@
5 if (!(resconf = dns_resconf_open(&error)))
6 goto error;
7
8 - if ((error = dns_resconf_loadpath(resconf, "/etc/resolv.conf"))) {
9 + if ((error = dns_resconf_loadpath(resconf, "@TERMUX_PREFIX@/etc/resolv.conf"))) {
10 /*
11 * NOTE: Both the glibc and BIND9 resolvers ignore a missing
12 * /etc/resolv.conf, defaulting to a nameserver of
13 @@ -10211,7 +10211,7 @@
14 panic("dns_resconf_open: %s", dns_strerror(error));
15
16 if (!MAIN.resconf.count)
17 - MAIN.resconf.path[MAIN.resconf.count++] = "/etc/resolv.conf";
18 + MAIN.resconf.path[MAIN.resconf.count++] = "@TERMUX_PREFIX@/etc/resolv.conf";
19
20 for (i = 0; i < MAIN.resconf.count; i++) {
21 path = MAIN.resconf.path[i];
22 diff -u -r ../gnupg-2.1.21/dirmngr/dns-stuff.c ./dirmngr/dns-stuff.c
23 --- ../gnupg-2.1.21/dirmngr/dns-stuff.c 2017-05-15 14:13:22.000000000 +0200
24 +++ ./dirmngr/dns-stuff.c 2017-05-18 14:02:29.025024667 +0200
25 @@ -496,7 +496,7 @@
26 #else /* Unix */
27 const char *fname;
28
29 - fname = "/etc/resolv.conf";
30 + fname = "@TERMUX_PREFIX@/etc/resolv.conf";
31 err = libdns_error_to_gpg_error
32 (dns_resconf_loadpath (ld.resolv_conf, fname));
33 if (err)