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(-)

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)
        <<EOF;
 PROVE = prove

Reply via email to