summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure b/configure
index 1842078..ab62aa6 100755
--- a/configure
+++ b/configure
@@ -87,7 +87,9 @@ invalid() {
# Get the number of cores to use
nproc() {
{
- command nproc \
+ # Run command nproc in a subshell to work around a bash 3 bug
+ # https://stackoverflow.com/q/68143965
+ (command nproc) \
|| sysctl -n hw.ncpu \
|| getconf _NPROCESSORS_ONLN \
|| echo 1