diff options
author | Jehan <jehan@girinstud.io> | 2018-06-09 01:24:08 +0200 |
---|---|---|
committer | Jehan <jehan@girinstud.io> | 2018-06-11 15:13:55 +0200 |
commit | f96417e470ff4241260d740f43884a178a5bce5a (patch) | |
tree | 5e7b981dc564eb6a7b4535cfecc7dfb770e504ea /gio | |
parent | 631035342dcc8bc5b317b1283b7b0e12d867cda5 (diff) | |
download | glib-f96417e470ff4241260d740f43884a178a5bce5a.tar.gz |
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.
Diffstat (limited to 'gio')
-rw-r--r-- | gio/gunixsocketaddress.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |