Skip to content

Commit f3ec7b8

Browse files
author
Vasyl Zubko
authored
Fix OpenBSD build (#1772)
1 parent d5c55e8 commit f3ec7b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sysinfo.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ ValueUnion GetSysctlImp(std::string const& name) {
162162
mib[1] = HW_CPUSPEED;
163163
}
164164

165-
if (sysctl(mib, 2, buff.data(), &buff.Size, nullptr, 0) == -1) {
165+
if (sysctl(mib, 2, buff.data(), &buff.size, nullptr, 0) == -1) {
166166
return ValueUnion();
167167
}
168168
return buff;
@@ -734,7 +734,7 @@ double GetCPUCyclesPerSecond(CPUInfo::Scaling scaling) {
734734
#endif
735735
unsigned long long hz = 0;
736736
#if defined BENCHMARK_OS_OPENBSD
737-
if (GetSysctl(freqStr, &hz)) return hz * 1000000;
737+
if (GetSysctl(freqStr, &hz)) return static_cast<double>(hz * 1000000);
738738
#else
739739
if (GetSysctl(freqStr, &hz)) return hz;
740740
#endif

0 commit comments

Comments
 (0)