Also, here's a small patch to make ares_gethostbyname() work better in the face of nameservers which do weird things in response to AAAA queries.
p.