From: Otto Date: Sun, 24 Oct 2021 16:56:57 +0000 (+0200) Subject: Implement fd-usage metric for OpenBSD X-Git-Tag: rec-4.6.0-beta1~42^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10891%2Fhead;p=thirdparty%2Fpdns.git Implement fd-usage metric for OpenBSD --- 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