Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dep/src/enet/unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ int
enet_address_set_host (ENetAddress * address, const char * name)
{
struct hostent * hostEntry = NULL;
int convert_test;
#ifdef HAS_GETHOSTBYNAME_R
struct hostent hostData;
char buffer [2048];
Expand All @@ -89,10 +90,11 @@ enet_address_set_host (ENetAddress * address, const char * name)
hostEntry -> h_addrtype != AF_INET)
{
#ifdef HAS_INET_PTON
if (! inet_pton (AF_INET, name, & address -> host))
convert_test = ! inet_pton (AF_INET, name, & address -> host);
#else
if (! inet_aton (name, (struct in_addr *) & address -> host))
convert_test = ! inet_aton (name, (struct in_addr *) & address -> host);
#endif
if (convert_test)
return -1;
return 0;
}
Expand Down