From fcf9ddc3d63c14b77058b3922074df45713f4186 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sat, 1 Jul 2017 08:53:30 +0200 Subject: [PATCH] Drop more res_init() patches --- packages/apt/apt-pkg-contrib-srvrec.cc.patch | 5 +--- packages/finch/dnssrv.patch.disabled | 31 -------------------- 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 packages/finch/dnssrv.patch.disabled diff --git a/packages/apt/apt-pkg-contrib-srvrec.cc.patch b/packages/apt/apt-pkg-contrib-srvrec.cc.patch index 541e3a878..d698023f6 100644 --- a/packages/apt/apt-pkg-contrib-srvrec.cc.patch +++ b/packages/apt/apt-pkg-contrib-srvrec.cc.patch @@ -1,7 +1,7 @@ diff -u -r ../apt-1.1.3/apt-pkg/contrib/srvrec.cc ./apt-pkg/contrib/srvrec.cc --- ../apt-1.1.3/apt-pkg/contrib/srvrec.cc 2015-11-30 03:08:24.000000000 -0500 +++ ./apt-pkg/contrib/srvrec.cc 2015-12-03 16:21:54.397715576 -0500 -@@ -40,14 +40,27 @@ +@@ -40,14 +40,24 @@ struct servent *s_ent = nullptr; std::vector buf(1024); @@ -18,10 +18,7 @@ diff -u -r ../apt-1.1.3/apt-pkg/contrib/srvrec.cc ./apt-pkg/contrib/srvrec.cc return GetSrvRecords(target, Result); } -+/* Bionic has res_init() but it's not in any header */ +#ifdef __ANDROID__ -+extern "C" int res_init(); -+extern "C" int res_query(const char* dname, int class_, int type_, unsigned char* answer, int anslen); +extern "C" int __dn_skipname(const unsigned char* comp_dn, const unsigned char* eom); +static inline int dn_skipname(const unsigned char* a, const unsigned char* b) { return __dn_skipname(a,b); } +#endif diff --git a/packages/finch/dnssrv.patch.disabled b/packages/finch/dnssrv.patch.disabled deleted file mode 100644 index c17073728..000000000 --- a/packages/finch/dnssrv.patch.disabled +++ /dev/null @@ -1,31 +0,0 @@ -diff -u -r ../pidgin-2.10.9/libpurple/dnssrv.c ./libpurple/dnssrv.c ---- ../pidgin-2.10.9/libpurple/dnssrv.c 2014-02-02 22:29:17.000000000 +0100 -+++ ./libpurple/dnssrv.c 2014-03-06 22:16:22.000000000 +0100 -@@ -54,6 +54,17 @@ - #include "eventloop.h" - #include "network.h" - -+#ifdef __ANDROID__ -+#include -+#define GETSHORT(s, cp) do { \ -+ register const u_char *t_cp = (const u_char *)(cp); \ -+ (s) = ((uint16_t)t_cp[0] << 8) \ -+ | ((uint16_t)t_cp[1]) \ -+ ; \ -+ (cp) += sizeof(uint16_t); \ -+} while (0) -+#endif -+ - static PurpleSrvTxtQueryUiOps *srv_txt_query_ui_ops = NULL; - - #ifndef _WIN32 -@@ -485,7 +496,9 @@ - if (size == -1) { - purple_debug_warning("dnssrv", "res_query returned an error\n"); - /* Re-read resolv.conf and friends in case DNS servers have changed */ -+#ifndef __ANDROID__ - res_init(); -+#endif - } else - purple_debug_info("dnssrv", "Found 0 entries, errno is %i\n", errno); -