diff --git a/src/win32/thread.cpp b/src/win32/thread.cpp index ed2c10bf..5c789b65 100644 --- a/src/win32/thread.cpp +++ b/src/win32/thread.cpp @@ -529,11 +529,12 @@ namespace boost unsigned thread::physical_concurrency() BOOST_NOEXCEPT { -#if BOOST_PLAT_WINDOWS_RUNTIME +#if BOOST_PLAT_WINDOWS_RUNTIME \ + || ( BOOST_USE_WINAPI_VERSION <= BOOST_WINAPI_VERSION_WINXP ) \ // a bit too strict: Windows XP with SP3 would be sufficient + || ( defined(__MINGW32__) && !defined(__MINGW64__) ) return hardware_concurrency(); #else unsigned cores = 0; -#if !(defined(__MINGW32__) || defined (__MINGW64__)) DWORD size = 0; GetLogicalProcessorInformation(NULL, &size); @@ -550,7 +551,6 @@ namespace boost if (buffer[i].Relationship == RelationProcessorCore) ++cores; } -#endif return cores; #endif }