Portability fix

This commit is contained in:
Pierre Pronchery 2010-10-29 00:47:03 +00:00
parent 6c8e4c8637
commit ec41f65e9b

View File

@ -363,7 +363,7 @@ static int _connect_addr(String const * service, uint32_t * addr)
}
if((he = gethostbyname(server)) == NULL)
return error_set_code(1, "%s", hstrerror(h_errno));
*addr = *((uint32_t*)he->h_addr);
*addr = *((uint32_t*)he->h_addr_list[0]);
return 0;
}