diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 0ebfa15a0..b3e29374a 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -1123,8 +1123,10 @@ lookup_uid_data (uid_t uid) char buffer[4096]; struct passwd pwbuf; struct passwd *pwbufp; +#ifndef __BIONIC__ char *gecos, *comma; - +#endif + if (uid_cache == NULL) uid_cache = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify)uid_data_free); @@ -1209,10 +1211,12 @@ static char * lookup_gid_name (gid_t gid) { char *name; +#if defined (HAVE_GETGRGID_R) char buffer[4096]; struct group gbuf; +#endif struct group *gbufp; - + if (gid_cache == NULL) gid_cache = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify)g_free); 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 diff --git a/gio/gunixsocketaddress.c b/gio/gunixsocketaddress.c index b0d3c8fe4..27e195e47 100644 --- a/gio/gunixsocketaddress.c +++ b/gio/gunixsocketaddress.c @@ -66,7 +66,9 @@ enum PROP_ADDRESS_TYPE }; +#ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX sizeof (((struct sockaddr_un *) 0)->sun_path) +#endif struct _GUnixSocketAddressPrivate {