diff options
Diffstat (limited to 'src/thread.cpp')
-rw-r--r-- | src/thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread.cpp b/src/thread.cpp index b07f8f8..f27136a 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); |