FileSystem: follow c++17 and unbreak FreeBSD

This commit is contained in:
Filipe da Silva Santos 2021-12-28 06:16:52 +00:00 committed by tellowkrinkle
parent b475108ff3
commit 9e705b2f53
1 changed files with 1 additions and 1 deletions

View File

@ -1534,7 +1534,7 @@ std::string FileSystem::GetProgramPath()
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
char buffer[PATH_MAX];
size_t cb = sizeof(buffer) - 1;
int res = sysctl(mib, countof(mib), buffer, &cb, nullptr, 0);
int res = sysctl(mib, std::size(mib), buffer, &cb, nullptr, 0);
if (res != 0)
return {};