diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2cd504b6c..5c69aeeab 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 23 10:42:00 2001 Corinna Vinschen + + * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly. + * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto. + Thu Feb 22 17:09:00 2001 Corinna Vinschen * path.cc (symlink): Keep relative paths relative in the DOS diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index 81bfdc66b..2073a6e23 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -332,7 +332,7 @@ fhandler_dev_mem::mmap (caddr_t *addr, size_t len, DWORD access, syscall_printf ("-1 = mmap(): NtMapViewOfSection failed with %E"); return INVALID_HANDLE_VALUE; } - if ((flags & MAP_FIXED) && base != addr) + if ((flags & MAP_FIXED) && base != *addr) { set_errno (EINVAL); syscall_printf ("-1 = mmap(): address shift with MAP_FIXED given"); diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 42a7b6964..4ad970ae8 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -729,9 +729,9 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access, } void *base = MapViewOfFileEx (h, access, 0, off, len, - (flags & MAP_FIXED) ? addr : NULL); + (flags & MAP_FIXED) ? *addr : NULL); - if (!base || ((flags & MAP_FIXED) && base != addr)) + if (!base || ((flags & MAP_FIXED) && base != *addr)) { if (!base) {