mdbx-osx: ignore fcntl(F_RDADVISE) error (RAM-disk, etc).

This commit is contained in:
Leonid Yuriev 2019-09-03 16:44:14 -07:00
parent 7fc4c4fccb
commit a55cffaae8

View File

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