Swap (macOS): fixes a compiler warning

This commit is contained in:
Carter Li
2026-04-08 20:19:27 +08:00
committed by 李通洲
parent 17eb22dfdb
commit d71d6a679d
+5 -3
View File
@@ -11,9 +11,11 @@ const char* ffDetectSwap(FFlist* result) {
}
if (xsw.xsu_total == 0) {
if (!__builtin_available(macOS 26.0, *)) {
if (ffSysctlGetInt("vm.compressor_mode", 4) <= 2) { // No longer available in macOS 26.0
return NULL; // Swap is disabled
if (__builtin_available(macOS 26.0, *)) {
// "vm.compressor_mode" no longer exists in macOS 26.0
} else {
if (ffSysctlGetInt("vm.compressor_mode", 4) <= 2) {
return NULL; // Swap is disabled
}
}
}