diff --git a/llama.cpp b/llama.cpp index 4e4495739..888d0ea9c 100644 --- a/llama.cpp +++ b/llama.cpp @@ -1044,7 +1044,7 @@ struct llama_mlock { } } -#ifdef _POSIX_MEMLOCK_RANGE +#if defined(_POSIX_MEMLOCK_RANGE) && defined(RLIMIT_MEMLOCK) static constexpr bool SUPPORTED = true; static size_t lock_granularity() {