Also build when NI_MAXHOST is not defined
This commit is contained in:
parent
fc381df7c2
commit
0c526125c9
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user