aboutsummaryrefslogtreecommitdiff
path: root/cpu-miner.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2011-06-09 03:47:07 -0400
committerJeff Garzik <jgarzik@pobox.com>2011-06-09 03:47:07 -0400
commit994c700ff4b029ce693a57e53c6870ec4acce907 (patch)
tree0192c6b89815526c092c06c1f9f2acf0ac4161b4 /cpu-miner.c
parent0091c4e128e216a88ed068c750e05d89fcbddc52 (diff)
Fix number-of-threads init logic on Windows
Diffstat (limited to 'cpu-miner.c')
-rw-r--r--cpu-miner.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpu-miner.c b/cpu-miner.c
index 1d502b5..a3de4b9 100644
--- a/cpu-miner.c
+++ b/cpu-miner.c
@@ -856,7 +856,10 @@ static void parse_arg (int key, char *arg)
show_usage();
}
-#ifndef WIN32
+#ifdef WIN32
+ if (!opt_n_threads)
+ opt_n_threads = 1;
+#else
num_processors = sysconf(_SC_NPROCESSORS_ONLN);
if (!opt_n_threads)
opt_n_threads = num_processors;