From a68eedb2d991e3434991719dbee9ed233c4f5786 Mon Sep 17 00:00:00 2001 From: Otto Date: Sun, 24 Oct 2021 18:56:57 +0200 Subject: [PATCH] Implement fd-usage metric for OpenBSD --- pdns/misc.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pdns/misc.cc b/pdns/misc.cc index 278c472230..8fdc84a46c 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -1301,6 +1301,9 @@ uint64_t getOpenFileDescriptors(const std::string&) closedir(dirhdl); return ret; +#elif defined(__OpenBSD__) + // FreeBSD also has this in libopenbsd, but I don't know if that's available always + return getdtablecount(); #else return 0; #endif -- 2.47.2