From f96417e470ff4241260d740f43884a178a5bce5a Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 9 Jun 2018 01:24:08 +0200 Subject: [PATCH] gio: UNIX_PATH_MAX may be defined. On an Android build, API 22, at least, I got a: > warning: "UNIX_PATH_MAX" redefined We were currently defining it as: > #define UNIX_PATH_MAX sizeof (((struct sockaddr_un *) 0)->sun_path) Whereas Android's headers define this variable of sockaddr_un as: > char sun_path[UNIX_PATH_MAX]; So by definition, we will still get the right result in the end by just using the original value of UNIX_PATH_MAX. --- gio/gunixsocketaddress.c | 2 ++ 1 file changed, 2 insertions(+) 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 {