Respect /etc/hosts

https://hydra.nixos.org/build/161439329
This commit is contained in:
Eelco Dolstra 2021-12-13 19:37:30 +01:00
parent cc6406cc59
commit e2e5f3a78f

View file

@ -145,10 +145,10 @@ static void preloadNSS() {
* *
* All other platforms are unaffected. * All other platforms are unaffected.
*/ */
if (dlopen (LIBNSS_DNS_SO, RTLD_NOW) == NULL) { if (!dlopen(LIBNSS_DNS_SO, RTLD_NOW))
printMsg(Verbosity::lvlWarn, fmt("Unable to load nss_dns backend")); warn("unable to load nss_dns backend");
} // FIXME: get hosts entry from nsswitch.conf.
__nss_configure_lookup ("hosts", "dns"); __nss_configure_lookup("hosts", "files dns");
#endif #endif
}); });
} }