system_mask >>= 1;
}
return count;
-#elif HAVE_SCHED_GETAFFINITY
+#elif defined(HAVE_SCHED_GETAFFINITY)
cpu_set_t cpu;
CPU_ZERO(&cpu);
if (sched_getaffinity(0, sizeof(cpu), &cpu) < 0)
for (unsigned i = 0; i < CPU_SETSIZE; i++)
count += CPU_ISSET(i, &cpu) != 0;
return count;
-#elif defined(__APPLE_)
+#elif defined(__APPLE__)
int count;
size_t size = sizeof(count) ;
if (sysctlbyname("hw.ncpu", &count, &size, NULL, 0))