diff --git a/include/ircd/info.h b/include/ircd/info.h index 1e9abfc77..fd118c214 100644 --- a/include/ircd/info.h +++ b/include/ircd/info.h @@ -51,6 +51,7 @@ namespace ircd::info extern const versions sd6_version; // System configuration / information + extern const size_t clk_tck; extern const string_view clock_source; extern const size_t aio_reqprio_max; extern const size_t aio_max; diff --git a/ircd/info.cc b/ircd/info.cc index 9bd626273..da93e5f99 100644 --- a/ircd/info.cc +++ b/ircd/info.cc @@ -944,6 +944,20 @@ ircd::info::vdso_p // System configuration // +#ifdef _SC_CLK_TCK +decltype(ircd::info::clk_tck) +ircd::info::clk_tck +{ + size_t(syscall(::sysconf, _SC_CLK_TCK)) +}; +#else +decltype(ircd::info::clk_tck) +ircd::info::clk_tck +{ + 1 // prevent #DE +}; +#endif + static char ircd_info_clock_source[32]; decltype(ircd::info::clock_source) ircd::info::clock_source