diff --git a/httplib.h b/httplib.h index a582fad..e48f797 100644 --- a/httplib.h +++ b/httplib.h @@ -2940,7 +2940,7 @@ inline bool mmap::open(const char *path) { auto wpath = u8string_to_wstring(path); if (wpath.empty()) { return false; } -#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 +#if _WIN32_WINNT > _WIN32_WINNT_WIN7 hFile_ = ::CreateFile2(wpath.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, NULL); #else @@ -2962,7 +2962,7 @@ inline bool mmap::open(const char *path) { } size_ = static_cast(size.QuadPart); -#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 +#if _WIN32_WINNT > _WIN32_WINNT_WIN7 hMapping_ = ::CreateFileMappingFromApp(hFile_, NULL, PAGE_READONLY, size_, NULL); #else @@ -2981,7 +2981,7 @@ inline bool mmap::open(const char *path) { return false; } -#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 +#if _WIN32_WINNT > _WIN32_WINNT_WIN7 addr_ = ::MapViewOfFileFromApp(hMapping_, FILE_MAP_READ, 0, 0); #else addr_ = ::MapViewOfFile(hMapping_, FILE_MAP_READ, 0, 0, 0);