Commit ecf0e952 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mmap: fix large file support on 32-bits archs (closes #2188)

(cherry picked from commit 5b0e367e)
parent 219b054e
......@@ -199,7 +199,7 @@ static block_t *Block (access_t *p_access)
const uintptr_t page_mask = p_sys->page_size - 1;
/* Start the mapping on a page boundary: */
off_t outer_offset = p_access->info.i_pos & ~page_mask;
off_t outer_offset = p_access->info.i_pos & ~(off_t)page_mask;
/* Skip useless bytes at the beginning of the first page: */
size_t inner_offset = p_access->info.i_pos & page_mask;
/* Map no more bytes than remain: */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment