diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-03-29 18:27:28 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-03-29 18:27:28 +0000 |
commit | 9cb970074fb76f3507b0b97ef371308f3c384042 (patch) | |
tree | c9fe9bdbf49452fa2e4a35e96d58e69923e2790b /libcxx/src/thread.cpp | |
parent | 4b7cf64f66fe02b4dc4bbb3cf8cbed5d12df8cbe (diff) | |
download | bcm5719-llvm-9cb970074fb76f3507b0b97ef371308f3c384042.tar.gz bcm5719-llvm-9cb970074fb76f3507b0b97ef371308f3c384042.zip |
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624.
llvm-svn: 178354
Diffstat (limited to 'libcxx/src/thread.cpp')
-rw-r--r-- | libcxx/src/thread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp index 635500292bb..c6f6748f01b 100644 --- a/libcxx/src/thread.cpp +++ b/libcxx/src/thread.cpp @@ -67,7 +67,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) +#elif (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && defined(_SC_NPROCESSORS_ONLN)) || defined(EMSCRIPTEN) 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. |