Commit 8e0e24936cf9929117a20f4d64115617260216ef

Jeff Garzik 2011-06-08T22:30:10

only read processor count via sysconf on non-Windows platforms

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)