From 0b8e75d9951d7f3b422f30e97cd6cf727fdc979c Mon Sep 17 00:00:00 2001 From: Oliver Schonrock Date: Sun, 8 Dec 2024 19:45:07 +0000 Subject: [PATCH] make compatible with FreeBSD fixes https://github.com/vimpunk/mio/issues/110 --- include/mio/detail/mmap.ipp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));