From a41d7a18df47da0255b91da5a74d6fcc800fb68c Mon Sep 17 00:00:00 2001 From: vazub Date: Sun, 24 Mar 2024 19:17:28 +0100 Subject: [PATCH] Fix OpenBSD build --- src/sysinfo.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysinfo.cc b/src/sysinfo.cc index 57a23e7bc0..73b46a5a1a 100644 --- a/src/sysinfo.cc +++ b/src/sysinfo.cc @@ -162,7 +162,7 @@ ValueUnion GetSysctlImp(std::string const& name) { mib[1] = HW_CPUSPEED; } - if (sysctl(mib, 2, buff.data(), &buff.Size, nullptr, 0) == -1) { + if (sysctl(mib, 2, buff.data(), &buff.size, nullptr, 0) == -1) { return ValueUnion(); } return buff; @@ -734,7 +734,7 @@ double GetCPUCyclesPerSecond(CPUInfo::Scaling scaling) { #endif unsigned long long hz = 0; #if defined BENCHMARK_OS_OPENBSD - if (GetSysctl(freqStr, &hz)) return hz * 1000000; + if (GetSysctl(freqStr, &hz)) return static_cast(hz * 1000000); #else if (GetSysctl(freqStr, &hz)) return hz; #endif