Skip to content

Commit

Permalink
Use _SC_NPROCESSORS_CONF instead of _SC_NPROCESSORS_ONLN
Browse files Browse the repository at this point in the history
  • Loading branch information
pooler committed Jun 2, 2012
1 parent 21cba02 commit 003d1f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpu-miner.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -998,8 +998,8 @@ int main(int argc, char *argv[])
SYSTEM_INFO sysinfo; SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo); GetSystemInfo(&sysinfo);
num_processors = sysinfo.dwNumberOfProcessors; num_processors = sysinfo.dwNumberOfProcessors;
#elif defined(_SC_NPROCESSORS_ONLN) #elif defined(_SC_NPROCESSORS_CONF)
num_processors = sysconf(_SC_NPROCESSORS_ONLN); num_processors = sysconf(_SC_NPROCESSORS_CONF);
#elif defined(HW_NCPU) #elif defined(HW_NCPU)
int req[] = { CTL_HW, HW_NCPU }; int req[] = { CTL_HW, HW_NCPU };
size_t len = sizeof(num_processors); size_t len = sizeof(num_processors);
Expand Down

0 comments on commit 003d1f1

Please sign in to comment.