mdbx-posix: add check for _POSIX_MAPPED_FILES.

Change-Id: Ie7ee8464346cd57d8cd96b6c5df23da8ed37cbbb
This commit is contained in:
Leonid Yuriev 2021-03-17 00:57:45 +03:00
parent 7dfd3f18f8
commit 0fd90de97e

View File

@ -207,6 +207,11 @@ static inline void *mdbx_realloc(void *ptr, size_t bytes) {
#else /*----------------------------------------------------------------------*/
#include <unistd.h>
#if !defined(_POSIX_MAPPED_FILES) || _POSIX_MAPPED_FILES < 1
#error "libmdbx requires the _POSIX_MAPPED_FILES feature"
#endif /* _POSIX_MAPPED_FILES */
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
@ -217,7 +222,6 @@ static inline void *mdbx_realloc(void *ptr, size_t bytes) {
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/uio.h>
#include <unistd.h>
typedef pthread_t mdbx_thread_t;
typedef pthread_key_t mdbx_thread_key_t;
#define INVALID_HANDLE_VALUE (-1)