errno and h_errno values are not the same #876 by rfelker
This commit is contained in:
parent
fa6c4844b2
commit
4f93a63467
@ -62,7 +62,6 @@ int INET_resolve(const char *name, struct sockaddr_in *s_in, int hostfirst)
|
|||||||
}
|
}
|
||||||
if (hostfirst) {
|
if (hostfirst) {
|
||||||
/* Don't try again */
|
/* Don't try again */
|
||||||
errno = h_errno;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -74,7 +73,6 @@ int INET_resolve(const char *name, struct sockaddr_in *s_in, int hostfirst)
|
|||||||
bb_error_msg("gethostbyname (%s)", name);
|
bb_error_msg("gethostbyname (%s)", name);
|
||||||
#endif
|
#endif
|
||||||
if ((hp = gethostbyname(name)) == (struct hostent *) NULL) {
|
if ((hp = gethostbyname(name)) == (struct hostent *) NULL) {
|
||||||
errno = h_errno;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
memcpy((char *) &s_in->sin_addr, (char *) hp->h_addr_list[0],
|
memcpy((char *) &s_in->sin_addr, (char *) hp->h_addr_list[0],
|
||||||
|
Loading…
Reference in New Issue
Block a user