summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-03-22 16:27:51 +0200
committerRich Felker <dalias@aerifal.cx>2016-03-24 13:48:47 -0400
commit5978eb703ce0e64dd778a88c1ffffb76fe5e2202 (patch)
tree7a44fa3793c67e242fb63d3da2f79892c5e94237
parentd578c74e677c9c29bfa0b5eec1f21506b9c05558 (diff)
downloadmusl-5978eb703ce0e64dd778a88c1ffffb76fe5e2202.tar.gz
fix gethostbyaddr_r to fill struct hostent.h_length as appropriate
-rw-r--r--src/network/gethostbyaddr_r.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/gethostbyaddr_r.c b/src/network/gethostbyaddr_r.c
index 66e03309..0f1e61aa 100644
--- a/src/network/gethostbyaddr_r.c
+++ b/src/network/gethostbyaddr_r.c
@@ -64,6 +64,7 @@ int gethostbyaddr_r(const void *a, socklen_t l, int af,
}
h->h_addrtype = af;
+ h->h_length = l;
h->h_name = h->h_aliases[0];
*res = h;
return 0;