mirror of
https://github.com/google/benchmark.git
synced 2025-03-05 06:40:09 +08:00
Merge pull request #130 from umireon/sysinfo-macosx-illegal-nullptr
Fix the compilation error against G++ on Mac OS X.
This commit is contained in:
commit
3e1dbc81f4
1
AUTHORS
1
AUTHORS
@ -17,6 +17,7 @@ Evgeny Safronov <division494@gmail.com>
|
||||
Felix Homann <linuxaudio@showlabor.de>
|
||||
Google Inc.
|
||||
JianXiong Zhou <zhoujianxiong2@gmail.com>
|
||||
Kaito Udagawa <umireon@gmail.com>
|
||||
Lei Xu <eddyxu@gmail.com>
|
||||
Matt Clarkson <mattyclarkson@gmail.com>
|
||||
Oleksandr Sochka <sasha.sochka@gmail.com>
|
||||
|
@ -31,6 +31,7 @@ Eugene Zhuk <eugene.zhuk@gmail.com>
|
||||
Evgeny Safronov <division494@gmail.com>
|
||||
Felix Homann <linuxaudio@showlabor.de>
|
||||
JianXiong Zhou <zhoujianxiong2@gmail.com>
|
||||
Kaito Udagawa <umireon@gmail.com>
|
||||
Lei Xu <eddyxu@gmail.com>
|
||||
Matt Clarkson <mattyclarkson@gmail.com>
|
||||
Oleksandr Sochka <sasha.sochka@gmail.com>
|
||||
|
@ -267,7 +267,7 @@ void InitializeSystemInfo() {
|
||||
int num_cpus = 0;
|
||||
size_t size = sizeof(num_cpus);
|
||||
int numcpus_name[] = {CTL_HW, HW_NCPU};
|
||||
if (::sysctl(numcpus_name, arraysize(numcpus_name), &num_cpus, &size, 0, 0) ==
|
||||
if (::sysctl(numcpus_name, arraysize(numcpus_name), &num_cpus, &size, nullptr, 0) ==
|
||||
0 &&
|
||||
(size == sizeof(num_cpus)))
|
||||
cpuinfo_num_cpus = num_cpus;
|
||||
|
Loading…
Reference in New Issue
Block a user