diff options
Diffstat (limited to 'system/lib/libcxx/thread.cpp')
-rw-r--r-- | system/lib/libcxx/thread.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/lib/libcxx/thread.cpp b/system/lib/libcxx/thread.cpp index a2d95bb2..7a06b296 100644 --- a/system/lib/libcxx/thread.cpp +++ b/system/lib/libcxx/thread.cpp @@ -13,8 +13,8 @@ #include "future" #include "limits" #include <sys/types.h> -#if !_WIN32 -#if !__sun__ && !__linux__ +#if !defined(_WIN32) +#if !defined(__sun__) && !defined(__linux__) #include <sys/sysctl.h> #else #include <unistd.h> @@ -65,7 +65,7 @@ thread::hardware_concurrency() _NOEXCEPT std::size_t s = sizeof(n); sysctl(mib, 2, &n, &s, 0, 0); return n; -#elif (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && defined(_SC_NPROCESSORS_ONLN)) || defined(EMSCRIPTEN) +#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && defined(_SC_NPROCESSORS_ONLN) long result = sysconf(_SC_NPROCESSORS_ONLN); // sysconf returns -1 if the name is invalid, the option does not exist or // does not have a definite limit. |