projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dns: treat names rejected by res_mkquery as nonexistent rather than error
[musl]
/
src
/
network
/
getaddrinfo.c
diff --git
a/src/network/getaddrinfo.c
b/src/network/getaddrinfo.c
index
efaab30
..
9df045f
100644
(file)
--- a/
src/network/getaddrinfo.c
+++ b/
src/network/getaddrinfo.c
@@
-66,9
+66,11
@@
int getaddrinfo(const char *restrict host, const char *restrict serv, const stru
pthread_setcancelstate(
PTHREAD_CANCEL_DISABLE, &cs);
int r = connect(s, ta[i], tl[i]);
+ int saved_errno = errno;
pthread_setcancelstate(cs, 0);
close(s);
if (!r) continue;
+ errno = saved_errno;
}
switch (errno) {
case EADDRNOTAVAIL: