vcpkg/ports/benchmark/fix_qnx.patch
jim wang 7f3acf6937
[benchmark] Fix build failure under QNX (#35644)
* QNX

* update verison

---------

Co-authored-by: Jim wang (BEYONDSOFT CONSULTING INC) <v-wangjim@microsoft.com>
2024-01-29 19:59:02 -08:00

16 lines
679 B
Diff

diff --git a/src/sysinfo.cc b/src/sysinfo.cc
index 922e83a..ec9fd35 100644
--- a/src/sysinfo.cc
+++ b/src/sysinfo.cc
@@ -771,8 +771,8 @@ double GetCPUCyclesPerSecond(CPUInfo::Scaling scaling) {
kstat_close(kc);
return clock_hz;
#elif defined(BENCHMARK_OS_QNX)
- return static_cast<double>((int64_t)(SYSPAGE_ENTRY(cpuinfo)->speed) *
- (int64_t)(1000 * 1000));
+ return static_cast<double>(static_cast<int64_t>(SYSPAGE_ENTRY(cpuinfo)->speed) *
+ static_cast<int64_t>(1000 * 1000));
#elif defined(BENCHMARK_OS_QURT)
// QuRT doesn't provide any API to query Hexagon frequency.
return 1000000000;