OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
984e1c1
)
gethostbyname_r: set correct h_errno upon failure
author
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Thu, 20 Oct 2011 16:49:48 +0000
(18:49 +0200)
committer
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Thu, 20 Oct 2011 16:55:46 +0000
(18:55 +0200)
previously gethostbyname_r(ipv6.google.com);herror("ERROR:") gave
Answer name = |ipv6.google.com|
Answer type = |5|
herrno=1
h_errno=0
ERROR:: Error 0
herrno=1
h_errno=1
ERROR:: Unknown host
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/inet/resolv.c
patch
|
blob
|
history
diff --git
a/libc/inet/resolv.c
b/libc/inet/resolv.c
index
21e84e5
..
38a03bb
100644
(file)
--- a/
libc/inet/resolv.c
+++ b/
libc/inet/resolv.c
@@
-2170,6
+2170,7
@@
int gethostbyname_r(const char *name,
}
*h_errnop = HOST_NOT_FOUND;
+ __set_h_errno(HOST_NOT_FOUND);
i = TRY_AGAIN;
free_and_ret: