forked from lix-project/lix
preloadNSS: warn if unable to open nss backend
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
This commit is contained in:
parent
85717eff15
commit
ca8989daf3
|
@ -125,7 +125,9 @@ static void preloadNSS() {
|
||||||
load its lookup libraries in the parent before any child gets a chance to. */
|
load its lookup libraries in the parent before any child gets a chance to. */
|
||||||
std::call_once(dns_resolve_flag, []() {
|
std::call_once(dns_resolve_flag, []() {
|
||||||
#ifdef __GLIBC__
|
#ifdef __GLIBC__
|
||||||
dlopen (LIBNSS_DNS_SO, RTLD_NOW);
|
if (dlopen (LIBNSS_DNS_SO, RTLD_NOW) == NULL) {
|
||||||
|
printMsg(Verbosity::lvlWarn, fmt("Unable to load nss_dns backend"));
|
||||||
|
}
|
||||||
__nss_configure_lookup ("hosts", "dns");
|
__nss_configure_lookup ("hosts", "dns");
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue