This commit is contained in:
lizzie
2026-05-19 08:00:31 +00:00
parent 4e31882d30
commit 69a7112e86
7 changed files with 31 additions and 19 deletions
+2 -2
View File
@@ -8,7 +8,7 @@
// clang-format on
#else
#include <sys/types.h>
#if defined(__APPLE__) || (defined(__FreeBSD__) && !defined(_LIBCPP_HAS_MUSL_LIBC))
#if defined(__APPLE__) || (defined(__FreeBSD__) && !defined(__OPENORBIS__))
#include <sys/sysctl.h>
#elif defined(__linux__)
#include <sys/sysinfo.h>
@@ -43,7 +43,7 @@ static MemoryInfo Detect() {
sysctlbyname("vm.swapusage", &vmusage, &sizeof_vmusage, nullptr, 0);
mem_info.TotalPhysicalMemory = ramsize;
mem_info.TotalSwapMemory = vmusage.xsu_total;
#elif defined(__FreeBSD__) && !defined(_LIBCPP_HAS_MUSL_LIBC)
#elif defined(__FreeBSD__) && !defined(__OPENORBIS__)
u_long physmem, swap_total;
std::size_t sizeof_u_long = sizeof(u_long);
// sysctlbyname(const char *, void *, size_t *, const void *, size_t);