Skip to content

Commit a1f0f9c

Browse files
committed
Fix for mingw
1 parent 23a6841 commit a1f0f9c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/platform/memory_mapping.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ namespace detail {
3232
GetSystemInfo(&info);
3333
return info.dwPageSize;
3434
}
35-
constexpr auto memory_readonly = PAGE_READONLY;
36-
constexpr auto memory_readwrite = PAGE_READWRITE;
3735
int mprotect_page_and_return_old_protections(void* page, int page_size, int protections) {
3836
DWORD old_protections;
3937
if(!VirtualProtect(page, page_size, protections, &old_protections)) {

src/platform/memory_mapping.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
#ifndef _MSC_VER
44

5-
#if !IS_WINDOWS
5+
#if IS_WINDOWS
6+
#ifndef WIN32_LEAN_AND_MEAN
7+
#define WIN32_LEAN_AND_MEAN
8+
#endif
9+
#include <windows.h>
10+
#else
611
#include <sys/mman.h>
712
#endif
813

0 commit comments

Comments
 (0)