Commit bc860af0 authored by Abseil Team's avatar Abseil Team Committed by Copybara-Service
Browse files

This trips up when compiling with -Wvla otherwise.

PiperOrigin-RevId: 529762901
Change-Id: I6ce4d630191bf265f847aef2d5dcc12a712faa60
parent a3580180
...@@ -199,8 +199,8 @@ size_t GetThreadCount() { ...@@ -199,8 +199,8 @@ size_t GetThreadCount() {
mib[5] = static_cast<int>(size / static_cast<size_t>(mib[4])); mib[5] = static_cast<int>(size / static_cast<size_t>(mib[4]));
// populate array of structs // populate array of structs
struct kinfo_proc info[mib[5]]; std::vector<struct kinfo_proc> info(mib[5]);
if (sysctl(mib, miblen, &info, &size, NULL, 0)) { if (sysctl(mib, miblen, info.data(), &size, NULL, 0)) {
return 0; return 0;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment