From e70d26b23e813eaa5f2d208b1a1e583e21237d8b Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 22 Jun 2022 11:04:36 -0700 Subject: [PATCH] ircd::net::dns: Allow undefined symbol ignored null by libnss_db. --- ircd/net_dns_netdb.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ircd/net_dns_netdb.cc b/ircd/net_dns_netdb.cc index 5dbc618cd..50f014e2f 100644 --- a/ircd/net_dns_netdb.cc +++ b/ircd/net_dns_netdb.cc @@ -62,7 +62,9 @@ ircd::net::dns::init::service_init() if(netdb_enable) { + #ifdef HAVE_NETDB_H + const mods::ldso::exceptions enable {false}; ::setservent(stay_open); netdb_ready = true; #endif @@ -77,6 +79,7 @@ noexcept if(std::exchange(netdb_ready, false)) { #ifdef HAVE_NETDB_H + const mods::ldso::exceptions enable {false}; ::endservent(); #endif } @@ -111,6 +114,8 @@ try { thread_local struct ::servent res, *ent {nullptr}; thread_local char _name[32], _prot[32], buf[2048]; + + const mods::ldso::exceptions enable {false}; const prof::syscall_usage_warning timer { "net::dns::service_port(%s)", name @@ -206,6 +211,8 @@ try thread_local struct ::servent res, *ent {nullptr}; thread_local char _prot[32], buf[2048]; + + const mods::ldso::exceptions enable {false}; const prof::syscall_usage_warning timer { "net::dns::service_name(%u)", port