mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 09:46:17 +01:00
GNetworkAddress: Build if AI_NUMERICSERV not defined
This is not defined on all Win32 SDKs and in some unixes. If its not defined its safe to just ignore it though.
This commit is contained in:
parent
d175fae8d5
commit
c910c3e7a3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user