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:
parent
7e00e36e33
commit
836b35bce2
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user