--- a/libs/thread/src/pthread/thread.cpp +++ b/libs/thread/src/pthread/thread.cpp @@ -388,8 +388,6 @@ namespace boost { #if defined(PTW32_VERSION) || defined(__hpux) return pthread_num_processors_np(); -#elif defined(__linux__) - return get_nprocs(); #elif defined(__APPLE__) || defined(__FreeBSD__) int count; size_t size=sizeof(count); @@ -397,6 +395,8 @@ namespace boost #elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN) int const count=sysconf(_SC_NPROCESSORS_ONLN); return (count>0)?count:0; +#elif defined(__linux__) + return get_nprocs(); #else return 0; #endif