1
0
mirror of https://github.com/google/benchmark.git synced 2025-03-31 14:40:29 +08:00

Update sysinfo.cc

This commit is contained in:
Helge Deller 2025-01-09 16:03:17 +01:00 committed by GitHub
parent 7e00e36e33
commit 836b35bce2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -494,7 +494,7 @@ int GetNumCPUsImpl() {
return static_cast<int>(sysinfo.dwNumberOfProcessors);
#elif defined(__linux__) || defined(BENCHMARK_OS_SOLARIS)
// Returns -1 in case of a failure.
int num_cpu = static_cast<int> (sysconf(_SC_NPROCESSORS_ONLN));
int num_cpu = static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
if (num_cpu < 0) {
PrintErrorAndDie("sysconf(_SC_NPROCESSORS_ONLN) failed with error: ",
strerror(errno));