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

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-01-23 14:35:57 +0300
committerKamil Rytarowski <n54@gmx.com>2016-01-23 14:35:57 +0300
commita31f7877defd21d01d048f07f2e8dbe8fe7615e7 (patch)
treeadfeaed3e7f2ef2dfc42cd35cf7929c732f20f14 /build.sh
parentd4e0b664660faf432a693794d27c9a57f75d79e5 (diff)
NetBSD: Add support for retrieving the number of available CPUs
$ uname NetBSD $ getconf NPROCESSORS_ONLN 2 $ getconf _NPROCESSORS_ONLN getconf: _NPROCESSORS_ONLN: unknown variable
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 743a2a684..7910e2783 100755
--- a/build.sh
+++ b/build.sh
@@ -220,6 +220,8 @@ build_native_corert()
# processors available to a single process.
if [ `uname` = "FreeBSD" ]; then
NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'`
+ elif [ `uname` = "NetBSD" ]; then
+ NumProc=$(($(getconf NPROCESSORS_ONLN)+1))
else
NumProc=$(($(getconf _NPROCESSORS_ONLN)+1))
fi