Fix link error on Linux/musl.

get_nprocs() is a GNU convenience function equivalent to POSIX2008
sysconf(_SC_NPROCESSORS_ONLN); the latter should be available in unistd.h
on any current *nix. (OS X supports this call since 10.5, and FreeBSD
currently supports it. But this commit does not change FreeBSD or OS X
versions.)
This commit is contained in:
Isaac Dunham
2014-08-03 15:06:30 -07:00
parent edc329883c
commit f7eb81a846
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ int get_num_procs(void);
#else
int get_num_procs(void) {
static int nums = 0;
if (!nums) nums = get_nprocs();
if (!nums) nums = sysconf(_SC_NPROCESSORS_ONLN);
return nums;
}
#endif