From a31f7877defd21d01d048f07f2e8dbe8fe7615e7 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Sat, 23 Jan 2016 12:35:57 +0100 Subject: [PATCH] NetBSD: Add support for retrieving the number of available CPUs $ uname NetBSD $ getconf NPROCESSORS_ONLN 2 $ getconf _NPROCESSORS_ONLN getconf: _NPROCESSORS_ONLN: unknown variable --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index 743a2a6845d..7910e278367 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