mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
fix return value of gethostnbyname[2]_r on result not found
these functions are horribly underspecified, inconsistent between historical systems, and should never have been included. however, the signatures we have match the glibc ones, and the glibc behavior is to treat NxDomain and NODATA results as a success condition, not an ENOENT error.
This commit is contained in:
parent
1e7fb12f77
commit
f081d5336a
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ int gethostbyname2_r(const char *name, int af,
|
|||
if (cnt<0) switch (cnt) {
|
||||
case EAI_NONAME:
|
||||
*err = HOST_NOT_FOUND;
|
||||
return ENOENT;
|
||||
return 0;
|
||||
case EAI_AGAIN:
|
||||
*err = TRY_AGAIN;
|
||||
return EAGAIN;
|
||||
|
|
Loading…
Add table
Reference in a new issue