diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-12-13 19:37:30 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-12-13 19:37:30 +0100 |
commit | e2e5f3a78f31e4e72170ebfe48cbbb082860cc24 (patch) | |
tree | 651d074a4be487f905afe20e23b8d7b0a0082575 /src/libmain | |
parent | cc6406cc598bff1f395616ee13716ac9a3510097 (diff) |
Respect /etc/hosts
https://hydra.nixos.org/build/161439329
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 4404e0195..f605184bb 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -145,10 +145,10 @@ static void preloadNSS() { * * All other platforms are unaffected. */ - if (dlopen (LIBNSS_DNS_SO, RTLD_NOW) == NULL) { - printMsg(Verbosity::lvlWarn, fmt("Unable to load nss_dns backend")); - } - __nss_configure_lookup ("hosts", "dns"); + if (!dlopen(LIBNSS_DNS_SO, RTLD_NOW)) + warn("unable to load nss_dns backend"); + // FIXME: get hosts entry from nsswitch.conf. + __nss_configure_lookup("hosts", "files dns"); #endif }); } |