am f2e4f8fd: am 2e359155: Merge "Fix dns search domain use in gethostbyname."

* commit 'f2e4f8fd6f9a7de6c98210f754c82ca694d0ef55':
  Fix dns search domain use in gethostbyname.
This commit is contained in:
Robert Greenwalt 2013-12-11 22:02:50 +00:00 committed by Android Git Automerger
commit 7c2ada7f98

View File

@ -272,6 +272,15 @@ res_nsearch(res_state statp,
(dots && !trailing_dot && (statp->options & RES_DNSRCH) != 0U)) {
int done = 0;
/* Unfortunately we need to load interface info
* (dns servers, search domains) before
* the domain stuff is tried. Will have a better
* fix after thread pools are used as this will
* be loaded once for the thread instead of each
* time a query is tried.
*/
_resolv_populate_res_for_iface(statp);
for (domain = (const char * const *)statp->dnsrch;
*domain && !done;
domain++) {