--- cpp/src/IceGrid/PlatformInfo.cpp~ 2011-06-03 21:07:43.000000000 +0200 +++ cpp/src/IceGrid/PlatformInfo.cpp 2011-06-03 21:07:43.000000000 +0200 @@ -24,7 +24,7 @@ # include // For PDH_MORE_DATA #else # include -# if defined(__APPLE__) +# if defined(__APPLE__) || defined(__FreeBSD__) # include # elif defined(__sun) # include @@ -222,7 +222,7 @@ SYSTEM_INFO sysInfo; GetSystemInfo(&sysInfo); _nProcessors = sysInfo.dwNumberOfProcessors; -#elif defined(__APPLE__) +#elif defined(__APPLE__) || defined(__FreeBSD__) static int ncpu[2] = { CTL_HW, HW_NCPU }; size_t sz = sizeof(_nProcessors); if(sysctl(ncpu, 2, &_nProcessors, &sz, 0, 0) == -1) @@ -446,7 +446,7 @@ info.avg1 = static_cast(_last1Total) / _usages1.size() / 100.0f; info.avg5 = static_cast(_last5Total) / _usages5.size() / 100.0f; info.avg15 = static_cast(_last15Total) / _usages15.size() / 100.0f; -#elif defined(__sun) || defined(__linux) || defined(__APPLE__) +#elif defined(__sun) || defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__) // // We use the load average divided by the number of // processors to figure out if the machine is busy or