about summary refs log tree commit homepage
path: root/Makefile.PL
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-09-09 12:01:35 +0000
committerEric Wong <e@80x24.org>2023-09-09 21:31:53 +0000
commit305ccc1e8502602b1fc766ba1a542c8edaf6a82a (patch)
treeb9b072059de05b15678963d0ecb28ba85424e58a /Makefile.PL
parent2b51fcc17a19904c0c63750ff3766d9c4b3c024c (diff)
downloadpublic-inbox-305ccc1e8502602b1fc766ba1a542c8edaf6a82a.tar.gz
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.
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL3
1 files changed, 2 insertions, 1 deletions
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