From 0091c4e128e216a88ed068c750e05d89fcbddc52 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Wed, 8 Jun 2011 22:30:10 -0400 Subject: [PATCH] only read processor count via sysconf on non-Windows platforms --- cpu-miner.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu-miner.c b/cpu-miner.c index 0d1a791..1d502b5 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -855,9 +855,12 @@ static void parse_arg (int key, char *arg) default: show_usage(); } + +#ifndef WIN32 num_processors = sysconf(_SC_NPROCESSORS_ONLN); if (!opt_n_threads) opt_n_threads = num_processors; +#endif /* !WIN32 */ } static void parse_config(void)