Skip to content

Commit

Permalink
Fix OpenBSD build (#1772)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasyl Zubko committed Mar 24, 2024
1 parent d5c55e8 commit f3ec7b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sysinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<double>(hz * 1000000);
#else
if (GetSysctl(freqStr, &hz)) return hz;
#endif
Expand Down

0 comments on commit f3ec7b8

Please sign in to comment.