struct hostent has no longer a member h_addr
Current netdb.h lacks support for the old h_addr pointer without
special USE_GNU defines...
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/connection.c
+++ b/connection.c
@@ -29,7 +29,7 @@
return -1;
}
sock.sin_family = hs->h_addrtype;
- memcpy (&sock.sin_addr.s_addr, hs->h_addr, hs->h_length);
+ memcpy (&sock.sin_addr.s_addr, hs->h_addr_list[0], hs->h_length);
}
if ((sockfd = socket (AF_INET, SOCK_STREAM, 0)) < 0) {