diff --git a/main.cpp b/main.cpp index a82ace48d..f86be6ac3 100644 --- a/main.cpp +++ b/main.cpp @@ -24,6 +24,8 @@ #include #include #include +#elif defined (_POSIX_MAPPED_FILES) +#include #endif #define ROUNDUP(X, K) (((X) + (K)-1) & -(K)) diff --git a/mmap.h b/mmap.h index 8bdd662d3..7850fee32 100644 --- a/mmap.h +++ b/mmap.h @@ -8,11 +8,12 @@ #include #include + #ifdef __cplusplus extern "C" { #endif -#ifdef _MSC_VER +#if defined (_MSC_VER) && !(defined (_POSIX_MAPPED_FILES)) #define NEED_WIN32_MMAP #include #include