From 305ccc1e8502602b1fc766ba1a542c8edaf6a82a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 9 Sep 2023 12:01:35 +0000 Subject: 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. --- Makefile.PL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 5a5628ba..d0652410 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) <