[glib: 1/4] gio: C_IN is defined in recent Android headers.



commit 631035342dcc8bc5b317b1283b7b0e12d867cda5
Author: Jehan <jehan girinstud io>
Date:   Sat Jun 9 01:15:18 2018 +0200

    gio: C_IN is defined in recent Android headers.
    
    C_IN macro was added years ago in bcbaf1bef0, using same value as the
    internal code of Android with the reasonning that "some parts of the API
    used by the resolver objects is not public in the Android NDK (yet)".
    Well since then things are changed, since it is definitely available (at
    least on the API 22 of Android which I am using) in the public header
    arpa/nameser_compat.h.
    Let's just add a #ifndef to handle both cases when you build with an
    older or recent API.

 gio/gthreadedresolver.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index e89dc156c..dad268c33 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -803,7 +803,9 @@ free_records (GList *records)
 
 #if defined(G_OS_UNIX)
 #ifdef __BIONIC__
+#ifndef C_IN
 #define C_IN 1
+#endif
 int res_query(const char *, int, int, u_char *, int);
 #endif
 #endif


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