1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-29 14:30:37 +08:00

Typofix to unbreak OpenBSD build

```
/usr/ports/pobj/benchmark-1.8.2/benchmark-1.8.2/src/sysinfo.cc:161:43: error: no member named 'Size' in 'benchmark::(anonymous namespace)::ValueUnion'; did you mean 'size'?
    if (sysctl(mib, 2, buff.data(), &buff.Size, nullptr, 0) == -1) {
                                          ^~~~
                                          size
/usr/ports/pobj/benchmark-1.8.2/benchmark-1.8.2/src/sysinfo.cc:111:15: note: 'size' declared here
  std::size_t size;
              ^
1 error generated.
```
This commit is contained in:
Klemens Nanni 2023-08-22 18:31:53 +03:00 committed by Klemens Nanni
parent e73915667c
commit 799e363bcd
No known key found for this signature in database

View File

@ -158,7 +158,7 @@ ValueUnion GetSysctlImp(std::string const& name) {
mib[1] = HW_CPUSPEED;
}
if (sysctl(mib, 2, buff.data(), &buff.Size, nullptr, 0) == -1) {
if (sysctl(mib, 2, buff.data(), &buff.size, nullptr, 0) == -1) {
return ValueUnion();
}
return buff;