gallium/util: Replace h_addr with h_addr_list[0].
authorVinson Lee <vlee@vmware.com>
Fri, 1 Jan 2010 23:01:22 +0000 (15:01 -0800)
committerVinson Lee <vlee@vmware.com>
Fri, 1 Jan 2010 23:01:22 +0000 (15:01 -0800)
Fixes compilation error on Mac OS.

src/gallium/auxiliary/util/u_network.c

index 9eb8f309cd19ab50a23a2266c8f2ba27f1bf00bc..87ee0e476852485fc04263b18f6302146a9e3d49 100644 (file)
@@ -117,7 +117,7 @@ u_socket_connect(const char *hostname, uint16_t port)
    if (!host)
       return -1;
 
-   memcpy((char *)&sa.sin_addr,host->h_addr,host->h_length);
+   memcpy((char *)&sa.sin_addr,host->h_addr_list[0],host->h_length);
    sa.sin_family= host->h_addrtype;
    sa.sin_port = htons(port);