diff --git a/vanitygen.c b/vanitygen.c index 9d88121..be4bfd5 100644 --- a/vanitygen.c +++ b/vanitygen.c @@ -244,6 +244,9 @@ vg_thread_loop(void *arg) int count_processors(void) { +#if defined(__APPLE__) + int count = sysconf(_SC_NPROCESSORS_ONLN); +#else FILE *fp; char buf[512]; int count = 0; @@ -257,7 +260,8 @@ count_processors(void) count += 1; } fclose(fp); - return count; +#endif + return count; } #endif