diff options
author | Adeel Mujahid <3840695+am11@users.noreply.github.com> | 2021-04-04 05:48:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 05:48:46 +0300 |
commit | b5e2c5f2a7e9930cb046e40e3c4eef620e5c285e (patch) | |
tree | c8ef020f61ef3ac487fd4c6d0ecd8ee58bb7ceb7 /src/coreclr/run-cppcheck.sh | |
parent | 21490fc0f3aa5c3c99c2bda8f4e36fd3f7233950 (diff) |
Fix FreeBSD __NumProc calculation (#50691)
Diffstat (limited to 'src/coreclr/run-cppcheck.sh')
-rwxr-xr-x | src/coreclr/run-cppcheck.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/coreclr/run-cppcheck.sh b/src/coreclr/run-cppcheck.sh index 454ab344301..a02a4e19948 100755 --- a/src/coreclr/run-cppcheck.sh +++ b/src/coreclr/run-cppcheck.sh @@ -42,8 +42,7 @@ SloccountOutput="sloccount.sc" # processors available to a single process. platform="$(uname)" if [ "$platform" = "FreeBSD" ]; then - output=("$(sysctl hw.ncpu)") - NumProc="$((output[1] + 1))" + NumProc=$(($(sysctl -n hw.ncpu)+1)) elif [ "$platform" = "NetBSD" || "$platform" = "SunOS" ]; then NumProc=$(($(getconf NPROCESSORS_ONLN)+1)) else |