aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libcxx/thread.cpp
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-03-29 16:32:07 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2013-03-29 16:37:19 +0700
commitfe73520cbf5993812ae40e970a5603c8cafbe5fb (patch)
tree465f01ab9384e029d0321134de75c7ae066d8aeb /system/lib/libcxx/thread.cpp
parentaa0108c75e4177b6db0705ce42998e92c6ac734f (diff)
Update libcxx to work with emscripten.
Diffstat (limited to 'system/lib/libcxx/thread.cpp')
-rw-r--r--system/lib/libcxx/thread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/lib/libcxx/thread.cpp b/system/lib/libcxx/thread.cpp
index 7a06b296..76af3d0c 100644
--- a/system/lib/libcxx/thread.cpp
+++ b/system/lib/libcxx/thread.cpp
@@ -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)
+#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.