aboutsummaryrefslogtreecommitdiff
path: root/src/thread.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <theraven@FreeBSD.org>2012-03-13 14:09:15 +0000
committerDavid Chisnall <theraven@FreeBSD.org>2012-03-13 14:09:15 +0000
commit362d815b81e2b4b66c33b99203d821b8928607e1 (patch)
tree491848d33dbdf1751fd52f321d3fbf70a8e616f2 /src/thread.cpp
parent1828c5696f7bf5850943ea6c660a493a5e648669 (diff)
Notes
Diffstat (limited to 'src/thread.cpp')
-rw-r--r--src/thread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread.cpp b/src/thread.cpp
index b07f8f8510721..f27136a53d050 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -12,7 +12,7 @@
#include "vector"
#include "future"
#include <sys/types.h>
-#if !_WIN32
+#if !_WIN32 && !__sun__
#include <sys/sysctl.h>
#endif // _WIN32
@@ -55,7 +55,7 @@ unsigned
thread::hardware_concurrency()
{
#if defined(CTL_HW) && defined(HW_NCPU)
- int n;
+ unsigned n;
int mib[2] = {CTL_HW, HW_NCPU};
std::size_t s = sizeof(n);
sysctl(mib, 2, &n, &s, 0, 0);