openbsd-ports/emulators/wine/patches/patch-dlls_ntdll_virtual.c
pirofti 20a76f09b8 Bring wine-1.1.21 in tree.
This is still work in progress. That means its not working yet, its not
linked to the build and it still has a long way to go.
We're adding this here so that developers can more easily work on it.

Okay sthen@.
2009-05-21 14:11:51 +00:00

12 lines
589 B
C

--- dlls/ntdll/virtual.c.orig Thu May 21 00:23:36 2009
+++ dlls/ntdll/virtual.c Thu May 21 00:22:03 2009
@@ -830,7 +830,7 @@ static NTSTATUS map_file_into_view( struct file_view *
{
int flags = MAP_FIXED | (shared_write ? MAP_SHARED : MAP_PRIVATE);
- if (mmap( (char *)view->base + start, size, prot, flags, fd, offset ) != (void *)-1)
+ if (mmap( (char *)view->base + start, ROUND_ADDR(size + page_mask, page_mask), prot, flags, fd, offset ) != (void *)-1)
goto done;
/* mmap() failed; if this is because the file offset is not */