Always call res_init() before getaddrinfo().