Also build when NI_MAXHOST is not defined

This commit is contained in:
Pierre Pronchery 2014-04-19 22:58:49 +02:00
parent fc381df7c2
commit 0c526125c9
2 changed files with 6 additions and 0 deletions

View File

@ -427,6 +427,9 @@ static int _tcp_error(char const * message, int code)
static int _tcp_server_add_client(TCP * tcp, TCPSocket * client)
{
TCPSocket ** p;
#ifndef NI_MAXHOST
# define NI_MAXHOST 256
#endif
char host[NI_MAXHOST];
char const * name = host;

View File

@ -393,6 +393,9 @@ static int _udp_client_init(UDPClient * client, struct sockaddr * sa,
socklen_t sa_len, UDP * udp)
{
AppTransportPluginHelper * helper = udp->helper;
#ifndef NI_MAXHOST
# define NI_MAXHOST 256
#endif
char host[NI_MAXHOST];
char const * name = host;