From a55cffaae8aa7ada58db79817a8477eec53bc03a Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 3 Sep 2019 16:44:14 -0700 Subject: [PATCH] mdbx-osx: ignore fcntl(F_RDADVISE) error (RAM-disk, etc). --- src/elements/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/elements/core.c b/src/elements/core.c index cf813013..91ae5e11 100644 --- a/src/elements/core.c +++ b/src/elements/core.c @@ -5977,8 +5977,8 @@ static int __cold mdbx_env_map(MDBX_env *env, const int is_exclusive, struct radvisory hint; hint.ra_offset = 0; hint.ra_count = usedsize; - if (unlikely(fcntl(env->me_fd, F_RDADVISE, &hint) == -1)) - return errno; + (void)/* Ignore ENOTTY for DB on the ram-disk and so on */ fcntl( + env->me_fd, F_RDADVISE, &hint); #endif #if defined(MADV_WILLNEED) if (unlikely(madvise(env->me_map, usedsize, MADV_WILLNEED) != 0))