diff --git a/include/mio/detail/mmap.ipp b/include/mio/detail/mmap.ipp index 716a171..1fec025 100644 --- a/include/mio/detail/mmap.ipp +++ b/include/mio/detail/mmap.ipp @@ -205,7 +205,7 @@ inline mmap_context memory_map(const file_handle_type file_handle, const int64_t char* mapping_start = static_cast(::mmap( 0, // Don't give hint as to where to map. length_to_map, - mode == access_mode::read ? PROT_READ : PROT_WRITE, + mode == access_mode::read ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED, file_handle, aligned_offset));