diff options
Diffstat (limited to 'sysdeps/mach/hurd/mmap.c')
-rw-r--r-- | sysdeps/mach/hurd/mmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c index 0fb1a08cfb..97930778ae 100644 --- a/sysdeps/mach/hurd/mmap.c +++ b/sysdeps/mach/hurd/mmap.c @@ -57,6 +57,7 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) break; case MAP_FILE: + case 0: /* Allow, e.g., just MAP_SHARED. */ { mach_port_t robj, wobj; if (err = HURD_DPORT_USE (fd, __io_map (port, &robj, &wobj))) @@ -91,7 +92,7 @@ __mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) mapaddr = (vm_address_t) addr; err = __vm_map (__mach_task_self (), &mapaddr, (vm_size_t) len, (vm_address_t) 0, - flags & MAP_FIXED, + ! (flags & MAP_FIXED), memobj, (vm_offset_t) offset, flags & (MAP_COPY|MAP_PRIVATE), vmprot, VM_PROT_ALL, |