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

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

parent f3c8f164
......@@ -203,7 +203,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