mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
..and of course I broke IPv4 net_gethostbyname() with it :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2359 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
13eb6379e7
commit
0edf041e14
@ -411,15 +411,16 @@ int net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6)
|
||||
}
|
||||
}
|
||||
freeaddrinfo(ailist);
|
||||
return count > 0 ? 0 : 1;
|
||||
#else
|
||||
hp = gethostbyname(addr);
|
||||
if (hp == NULL) return h_errno;
|
||||
|
||||
ip4->family = AF_INET;
|
||||
memcpy(&ip4->ip, hp->h_addr, 4);
|
||||
#endif
|
||||
|
||||
return count > 0 ? 0 : 1;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Get name for host, *name should be g_free()'d unless it's NULL.
|
||||
|
Loading…
Reference in New Issue
Block a user