[Toybox] [PATCH 1/2] macOS: use getconf rather than nproc for portability.

enh enh at google.com
Wed Nov 28 12:16:39 PST 2018


Needed to build for macOS.
---
 scripts/make.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/make.sh b/scripts/make.sh
index 306a7cd..59b1fd2 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -15,7 +15,7 @@ source ./configure
 UNSTRIPPED="generated/unstripped/$(basename "$OUTNAME")"

 # Try to keep one more cc invocation going than we have processors
-[ -z "$CPUS" ] && CPUS=$(($(nproc)+1))
+[ -z "$CPUS" ] && CPUS=$(($(getconf _NPROCESSORS_ONLN)+1))

 if [ -z "$SED" ]
 then
-- 
2.20.0.rc0.387.gc7a69e6b6c-goog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-macOS-use-getconf-rather-than-nproc-for-portability.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20181128/bf5b3278/attachment.bin>


More information about the Toybox mailing list