*/
static void get_ncpus(void)
{
+#ifdef _SC_NPROCESSORS_CONF
+ ncpus = sysconf(_SC_NPROCESSORS_CONF);
+#else
long last_cpu;
cpu_set_t cpus;
if (CPU_ISSET( last_cpu, &cpus) )
ncpus = last_cpu;
ncpus++;
+#endif
if (ncpus == 0) {
fatal(NULL, ERR_SYSCALL, "Insufficient number of CPUs\n");
/*NOTREACHED*/