Hi dschuff, danalbert,

NaCl shouldn't include sysctl.h when trying to determine 
std::thread::hardware_concurrency, it should instead use 
sysconf(_SC_NPROCESSORS_ONLN) through unistd.h. No test needs to be changed, 
since hardware_concurrency.pass.cpp already tests that 
std::thread::hardware_concurrency > 0.

http://reviews.llvm.org/D6470

Files:
  src/thread.cpp
Index: src/thread.cpp
===================================================================
--- src/thread.cpp
+++ src/thread.cpp
@@ -17,10 +17,10 @@
 #include "limits"
 #include <sys/types.h>
 #if !defined(_WIN32)
-#if !defined(__sun__) && !defined(__linux__) && !defined(_AIX)
-#include <sys/sysctl.h>
-#endif // !__sun__ && !__linux__ && !_AIX
-#include <unistd.h>
+# if !defined(__sun__) && !defined(__linux__) && !defined(_AIX) && !defined(__native_client__)
+#   include <sys/sysctl.h>
+# endif // !defined(__sun__) && !defined(__linux__) && !defined(_AIX) && !defined(__native_client__)
+# include <unistd.h>
 #endif // !_WIN32
 
 #if defined(__NetBSD__)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to