Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdeel Mujahid <3840695+am11@users.noreply.github.com>2021-04-04 05:48:46 +0300
committerGitHub <noreply@github.com>2021-04-04 05:48:46 +0300
commitb5e2c5f2a7e9930cb046e40e3c4eef620e5c285e (patch)
treec8ef020f61ef3ac487fd4c6d0ecd8ee58bb7ceb7 /src/coreclr/run-cppcheck.sh
parent21490fc0f3aa5c3c99c2bda8f4e36fd3f7233950 (diff)
Fix FreeBSD __NumProc calculation (#50691)
Diffstat (limited to 'src/coreclr/run-cppcheck.sh')
-rwxr-xr-xsrc/coreclr/run-cppcheck.sh3
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