fix darwin build

This commit is contained in:
Sergei Trifonov 2022-03-25 12:52:50 +01:00
parent 2e2a1c06a2
commit 85f2ed12e1

View File

@ -27,7 +27,7 @@ uint64_t getAvailableMemoryAmountOrZero()
unsigned int usermem;
size_t len = sizeof(usermem);
static int mib[2] = { CTL_HW, HW_USERMEM };
if (sysctl(mib, 2, &usermem, &len, NULL, 0) == 0 && len == sizeof(usermem))
if (sysctl(mib, 2, &usermem, &len, nullptr, 0) == 0 && len == sizeof(usermem))
return usermem;
else
return 0;