Skip to content

Commit 42169b4

Browse files
authored
added read flag for read/write mapping (#9)
1 parent 0ebb028 commit 42169b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/mio/detail/mmap.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ inline mmap_context memory_map(const file_handle_type file_handle, const int64_t
226226
char* mapping_start = static_cast<char*>(::mmap(
227227
0, // Don't give hint as to where to map.
228228
length_to_map,
229-
mode == access_mode::read ? PROT_READ : PROT_WRITE,
229+
mode == access_mode::read ? PROT_READ : PROT_READ | PROT_WRITE,
230230
MAP_SHARED,
231231
file_handle,
232232
aligned_offset));

0 commit comments

Comments
 (0)