connection.c
changeset 84 f59d8a8e786f
parent 77 49e0babccb23
child 111 2247473fd12d
--- 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) {