blob: 40b01e0c9ca5f01cde68ce09096d9d0cd20c8a8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff -rupN ./3rdParty/Unbound/src/unbound/libunbound/libunbound.c ./3rdParty/Unbound/src/unbound/libunbound/libunbound.c
--- ./3rdParty/Unbound/src/unbound/libunbound/libunbound.c 2012-01-12 13:52:38.000000000 +0000
+++ ./3rdParty/Unbound/src/unbound/libunbound/libunbound.c 2014-07-10 09:21:22.999839053 +0100
@@ -66,6 +66,10 @@
#include <iphlpapi.h>
#endif /* UB_ON_WINDOWS */
+#ifdef __ANDROID__
+#include "dns_android.h"
+#endif
+
struct ub_ctx*
ub_ctx_create(void)
{
@@ -811,6 +815,15 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, ch
char buf[1024];
char* parse, *addr;
int r;
+#ifdef __ANDROID__
+ int i;
+ r = dns_android_server_count();
+ for (i = 0; i < r; ++i) {
+ if (dns_android_server_get(i, buf, sizeof(buf)) == DNS_ANDROID_SUCCESS) {
+ ub_ctx_set_fwd(ctx, buf);
+ }
+ }
+#endif
if(fname == NULL) {
#if !defined(UB_ON_WINDOWS) || !defined(HAVE_WINDOWS_H)
|