Changed getaddrinfo to take proper arg types.