提交 5978eb70 编写于 作者: T Timo Teräs 提交者: Rich Felker

fix gethostbyaddr_r to fill struct hostent.h_length as appropriate

上级 d578c74e
...@@ -64,6 +64,7 @@ int gethostbyaddr_r(const void *a, socklen_t l, int af, ...@@ -64,6 +64,7 @@ int gethostbyaddr_r(const void *a, socklen_t l, int af,
} }
h->h_addrtype = af; h->h_addrtype = af;
h->h_length = l;
h->h_name = h->h_aliases[0]; h->h_name = h->h_aliases[0];
*res = h; *res = h;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册