]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Implement fd-usage metric for OpenBSD 10891/head
authorOtto <otto.moerbeek@open-xchange.com>
Sun, 24 Oct 2021 16:56:57 +0000 (18:56 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Sun, 24 Oct 2021 16:56:57 +0000 (18:56 +0200)
pdns/misc.cc

index 278c47223086309089927c7ddb8f64a5d3f9948b..8fdc84a46c33543d529a1f2091b451395502f701 100644 (file)
@@ -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