From: Eric Wong Date: Sat, 9 Sep 2023 12:01:35 +0000 (+0000) Subject: Makefile.PL: check `getconf NPROCESSORS_ONLN', too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=305ccc1e8502602b1fc766ba1a542c8edaf6a82a;p=thirdparty%2Fpublic-inbox.git Makefile.PL: check `getconf NPROCESSORS_ONLN', too NetBSD and OpenBSD getconf(1) don't accept a leading underscore, while glibc getconf(1) only accepts the leading underscore (`_NPROCESSORS_ONLN'). FreeBSD getconf(1) accepts both variants. --- diff --git a/Makefile.PL b/Makefile.PL index 5a5628bad..d06524104 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -196,7 +196,8 @@ WriteMakefile( ); sub MY::postamble { - my $N = (`{ getconf _NPROCESSORS_ONLN || nproc; } 2>/dev/null` || 1); + my $N = (`{ getconf _NPROCESSORS_ONLN || getconf NPROCESSORS_ONLN || + gnproc || nproc; } 2>/dev/null` || 1); $N += 1; # account for sleeps in some tests (and makes an IV) <