Fixed a bug that caused compilation error because gettaddrinfo() is not available in c89.