diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1b337ce89..7f1fefaa4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-15  Corinna Vinschen  <corinna@vinschen.de>
+
+	* mmap.cc (mmap64): Convert pagesize from DWORD to size_t to avoid
+	a rounding error for allocations beyond 4 Gigs.
+
 2013-10-05  Christopher Faylor  <me.cygwin2013@cgf.cx>
 
 	* ntdll.h: Guard against new header files.
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index c68d4195e..8175d6ea3 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -901,7 +901,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off)
   caddr_t base = NULL;
   struct stat st;
 
-  DWORD pagesize = wincap.allocation_granularity ();
+  size_t pagesize = wincap.allocation_granularity ();
 
   fh_anonymous.set_io_handle (INVALID_HANDLE_VALUE);
   fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);