summaryrefslogtreecommitdiff
path: root/recipes/glib/0016-gio-Fix-build-on-Android-Lollipop.patch
blob: 7dd6f2145aa79b29f375a46f73246fbffe01504b (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
31
32
33
34
35
36
37
38
39
40
41
42
From b2479dd810349aacf539c0a92fba7b2d2a9eda6c Mon Sep 17 00:00:00 2001
From: Edward Hervey <bilboed@bilboed.com>
Date: Tue, 27 Jan 2015 16:27:13 +0100
Subject: [PATCH] gio: Fix build on Android Lollipop

The various nameser headers are public headers starting from Android L
(target arch 21).
---
 gio/gthreadedresolver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index c02c593..0af726a 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -264,6 +264,7 @@ lookup_by_address_finish (GResolver     *resolver,
 #if defined(G_OS_UNIX)
 
 #ifdef __BIONIC__
+#if __ANDROID_API__ < 21
 /* Copy from bionic/libc/private/arpa_nameser_compat.h
  * and bionic/libc/private/arpa_nameser.h */
 typedef struct {
@@ -396,6 +397,7 @@ typedef enum __ns_type {
 	ns_t_max = 65536
 } ns_type;
 
+#endif  /* __ANDROID_API__ < 21 */
 #endif /* __BIONIC__ */
 
 static GVariant *
@@ -801,7 +803,6 @@ free_records (GList *records)
 
 #if defined(G_OS_UNIX)
 #ifdef __BIONIC__
-#define C_IN 1
 int res_query(const char *, int, int, u_char *, int);
 #endif
 #endif
-- 
2.1.0