1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #467 from dequis/EAI_SYSTEM

net_gethosterror: Handle EAI_SYSTEM ("System error") properly
This commit is contained in:
ailin-nemui 2016-04-07 12:33:03 +02:00
commit 0e5a32fb62

View File

@ -510,8 +510,12 @@ const char *net_gethosterror(int error)
{ {
g_return_val_if_fail(error != 0, NULL); g_return_val_if_fail(error != 0, NULL);
if (error == EAI_SYSTEM) {
return strerror(errno);
} else {
return gai_strerror(error); return gai_strerror(error);
} }
}
/* return TRUE if host lookup failed because it didn't exist (ie. not /* return TRUE if host lookup failed because it didn't exist (ie. not
some error with name server) */ some error with name server) */