Skip to content

Commit

Permalink
Fix EAI_NODATA and EAI_ADDRFAMILY availability tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ymmt2005 committed Jan 28, 2015
1 parent bc7651d commit 6a478ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ static yrmcds_error connect_to_server(const char* node, uint16_t port, int* serv
hint.ai_flags = AI_NUMERICSERV|AI_ADDRCONFIG;
int e = getaddrinfo(node, sport, &hint, &res);
if( e == EAI_FAMILY || e == EAI_NONAME
#ifdef _GNU_SOURCE
|| e == EAI_ADDRFAMILY || e == EAI_NODATA
#ifdef EAI_ADDRFAMILY
|| e == EAI_ADDRFAMILY
#endif
#ifdef EAI_NODATA
|| e == EAI_NODATA
#endif
) {
hint.ai_family = AF_INET6;
Expand Down

0 comments on commit 6a478ad

Please sign in to comment.