projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d175fae
)
GNetworkAddress: Build if AI_NUMERICSERV not defined
author
Alexander Larsson
<alexl@redhat.com>
Mon, 18 Feb 2013 09:30:29 +0000
(10:30 +0100)
committer
Alexander Larsson
<alexl@redhat.com>
Mon, 18 Feb 2013 09:30:29 +0000
(10:30 +0100)
This is not defined on all Win32 SDKs and in some unixes.
If its not defined its safe to just ignore it though.
gio/gnetworkaddress.c
patch
|
blob
|
history
diff --git
a/gio/gnetworkaddress.c
b/gio/gnetworkaddress.c
index
44c39f1
..
1335d94
100644
(file)
--- a/
gio/gnetworkaddress.c
+++ b/
gio/gnetworkaddress.c
@@
-251,7
+251,11
@@
g_network_address_parse_sockaddr (GNetworkAddress *addr)
gchar port[32];
memset (&hints, 0, sizeof (hints));
- hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
+ hints.ai_flags = AI_NUMERICHOST
+#ifdef AI_NUMERICSERV
+ | AI_NUMERICSERV
+#endif
+ ;
g_snprintf (port, sizeof (port), "%u", addr->priv->port);
if (getaddrinfo (addr->priv->hostname, port, &hints, &res) != 0)