--- lib/user/hostinfoPosix.c.orig 2008-03-19 08:49:50.000000000 +0100 +++ lib/user/hostinfoPosix.c 2008-03-27 17:40:38.000000000 +0100 @@ -68,6 +68,11 @@ #endif #endif +#if defined(__FreeBSD__) +#include +#include +#endif + #include "vmware.h" #include "hostType.h" #include "hostinfo.h" @@ -674,6 +679,15 @@ } return out; +#elseif (defined(__FreeBSD__) + uint32 out; + size_t outSize = sizeof out; + + if (sysctlbyname("kern.smp.cpus", &out, &outSize, NULL, 0) == -1) { + return -1; + } + + return out; #else static int count = 0;