diff options
Diffstat (limited to '3rdParty/Unbound/01_android_fixes.diff')
-rw-r--r-- | 3rdParty/Unbound/01_android_fixes.diff | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/3rdParty/Unbound/01_android_fixes.diff b/3rdParty/Unbound/01_android_fixes.diff new file mode 100644 index 0000000..40b01e0 --- /dev/null +++ b/3rdParty/Unbound/01_android_fixes.diff @@ -0,0 +1,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) |