diff --git a/src/platform_freebsd.cc b/src/platform_freebsd.cc index 1377250f340..7037f11eae6 100644 --- a/src/platform_freebsd.cc +++ b/src/platform_freebsd.cc @@ -181,13 +181,9 @@ double Platform::GetFreeMemory() { } double Platform::GetTotalMemory() { -#if defined(HW_PHYSMEM64) - uint64_t info; - static int which[] = {CTL_HW, HW_PHYSMEM64}; -#else - unsigned int info; + unsigned long info; static int which[] = {CTL_HW, HW_PHYSMEM}; -#endif + size_t size = sizeof(info); if (sysctl(which, 2, &info, &size, NULL, 0) < 0) {