hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 1809e28695c9ed52c59b9571dafea3f794dbb4dc
parent 5c7cd7750ee823382acb8c47248cf6b4549be626
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon, 18 Oct 2021 17:22:23 +0200

rt: simplify mmap fix-up branch

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mrt/+linux/syscalls.ha | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -245,9 +245,8 @@ export fn mmap( length: u64, prot: u64, flags: u64, fd: u64, offs: u64); return match (wrap_return(r)) { case err: errno => - // XXX: Type promotion would simplify this return if (r: int == -EPERM - && addr: uintptr == null: uintptr + && addr == null && (flags & MAP_ANON) > 0 && (flags & MAP_FIXED) == 0) { // Fix up incorrect EPERM from kernel: