diff options
-rw-r--r-- | lib/hostip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 76a781148..c1df3096b 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -113,7 +113,8 @@ struct hostent *GetHost(struct UrlData *data, h->h_addr_list[1] = NULL; h->h_addrtype = AF_INET; h->h_length = sizeof(*addrentry); - h->h_name = (char*)(h->h_addr_list + h->h_length); + h->h_name = *(h->h_addr_list) + h->h_length; + /* bad one h->h_name = (char*)(h->h_addr_list + h->h_length); */ MakeIP(ntohl(in),h->h_name,buf_size - (long)(h->h_name) + (long)buf); #if defined(HAVE_GETHOSTBYNAME_R) } |