Use getaddrinfo() instead of gethostbyname() in socket.c.