[vlc-devel] commit: mmap: fix large file support on 32-bits archs (closes #2188) ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Nov 8 16:52:17 CET 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Nov  8 17:51:28 2008 +0200| [5b0e367ea7bd4aef9927bd2fe1231ec625a1509c] | committer: Rémi Denis-Courmont 

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5b0e367ea7bd4aef9927bd2fe1231ec625a1509c
---

 modules/access/mmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/access/mmap.c b/modules/access/mmap.c
index ac91dc2..7f2605d 100644
--- a/modules/access/mmap.c
+++ b/modules/access/mmap.c
@@ -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: */




More information about the vlc-devel mailing list