Hello,
this is a reworked version of Yury Kirpichev's patch to add iOS support
to cares. Compared to the former version the following has been added:
* IPv6 name server now work properly. The ones ones in nsaddr_list have
their address family set to AF_UNSPEC. As a work-around we call
res_getservers instead.
* More options like search domains, ndots, etc. are applied
* Added autoconf magic to detect iPhone (iOS, tvOS, and watchOS)
presence and use libresolv there.
In theory we could use the libresolv code also on OSX. But to avoid
possible regressions I decided against it for a start.
Patch is attached and also in this PR:
https://github.com/bagder/c-ares/pull/29
Thanks,
Gregor