getaddrinfo and inet_ntop fix