[glib] gthreadedresolver: Fix compilation with res_nclose() but no res_nquery()



commit e2c16df4b5e6d31b6513bebb4a2bc1c5075fff47
Author: Sebastian <sebastian_ml gmx net>
Date:   Thu Mar 22 19:41:00 2018 +0000

    gthreadedresolver: Fix compilation with res_nclose() but no res_nquery()
    
    Some very odd systems have the functions to initialise and destroy a
    struct __res_state, but apparently not to do a DNS query using it. Fix
    the compilation on those systems.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794606

 gio/gthreadedresolver.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index fc5c1bb77..e89dc156c 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -869,6 +869,8 @@ do_lookup_records (GTask         *task,
   records = g_resolver_records_from_res_query (lrd->rrname, rrtype, answer->data, len, herr, &error);
   g_byte_array_free (answer, TRUE);
 
+#ifdef HAVE_RES_NQUERY
+
 #if defined(HAVE_RES_NDESTROY)
   res_ndestroy (&res);
 #elif defined(HAVE_RES_NCLOSE)
@@ -877,6 +879,8 @@ do_lookup_records (GTask         *task,
 #error "Your platform has res_ninit() but not res_nclose() or res_ndestroy(). Please file a bug at 
https://bugzilla.gnome.org/enter_bug.cgi?product=glib";
 #endif
 
+#endif  /* HAVE_RES_NQUERY */
+
 #else
 
   DNS_STATUS status;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]