From 9e705b2f530b44dbd36d08c50baa16c8a53bfd11 Mon Sep 17 00:00:00 2001 From: Filipe da Silva Santos Date: Tue, 28 Dec 2021 06:16:52 +0000 Subject: [PATCH] FileSystem: follow c++17 and unbreak FreeBSD --- common/FileSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index e289ba86f5..b25545aa19 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -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 {};