From dc316acb89a3872b1d652d7d1ede1ab8a2729856 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 8 Oct 2016 01:31:07 -0400 Subject: Fix jrp mmap MAP_ANON calls --- .bin/jrp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.bin/jrp.c') diff --git a/.bin/jrp.c b/.bin/jrp.c index 7fffe83f..c156942b 100755 --- a/.bin/jrp.c +++ b/.bin/jrp.c @@ -188,10 +188,10 @@ static char *prompt(EditLine *el __attribute((unused))) { int main(int argc, char *argv[]) { page = getpagesize(); - code.base = mmap(0, page, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, 0, 0); + code.base = mmap(0, page, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); if (code.base == MAP_FAILED) err(EX_OSERR, "mmap"); - stack.base = mmap(0, page, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, 0, 0); + stack.base = mmap(0, page, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); if (stack.base == MAP_FAILED) err(EX_OSERR, "mmap"); stack.limit = stack.base + page / sizeof(value); stack.ptr = stack.limit - 1; -- cgit 1.4.1