Allow compiling on Cygwin g++

This patch allows compiling on Cygwin.

Cygwin has partial support for RLIMIT, for example RLIMIT_STACK is supported, but RLIMIT_MEMLOCK is not :( (see https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/resource.cc;hb=HEAD for details)
This commit is contained in:
divinity76 2023-12-22 13:08:20 +01:00 committed by GitHub
parent 48b7ff193e
commit 0b2f601747
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {