mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 01:30:12 +01:00
ircd::info: Add runtime sysconf to get IOV_MAX.
This commit is contained in:
parent
eff4c475e3
commit
322e25e725
2 changed files with 9 additions and 0 deletions
|
@ -53,6 +53,7 @@ namespace ircd::info
|
|||
extern const int glibc_version[3];
|
||||
extern const string_view glibc_version_str;
|
||||
extern const int aio_reqprio_max;
|
||||
extern const size_t iov_max;
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
extern const ::utsname utsname;
|
||||
#endif
|
||||
|
|
|
@ -207,6 +207,14 @@ ircd::info::aio_reqprio_max
|
|||
#endif
|
||||
};
|
||||
|
||||
decltype(ircd::info::iov_max)
|
||||
ircd::info::iov_max
|
||||
{
|
||||
#ifdef _SC_IOV_MAX
|
||||
size_t(syscall(::sysconf, _SC_IOV_MAX))
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
decltype(ircd::info::utsname)
|
||||
ircd::info::utsname{[]
|
||||
|
|
Loading…
Add table
Reference in a new issue