summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2016-10-08 01:31:07 -0400
committerJune McEnroe <june@causal.agency>2016-10-08 01:31:07 -0400
commitdc316acb89a3872b1d652d7d1ede1ab8a2729856 (patch)
tree55a71b27949daf55c80efae13caa9dc832980b9f
parentFix jrp OR op (diff)
downloadsrc-dc316acb89a3872b1d652d7d1ede1ab8a2729856.tar.gz
src-dc316acb89a3872b1d652d7d1ede1ab8a2729856.zip
Fix jrp mmap MAP_ANON calls
-rwxr-xr-x.bin/jrp.c4
1 files changed, 2 insertions, 2 deletions
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;
tr class='nohover-highlight'> 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe It's actually in a good state now, I think. 2019-02-21Replace "view" with "window"June McEnroe I think originally I didn't want to use the same word as curses WINDOW but it's really much clearer for the user if they're just called windows. UI code probably needs yet another rewrite though. Still feels messy. 2019-02-21Remove ROT13June McEnroe It's just not convenient when it can only do the whole line... 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe Otherwise the "Traveling" message isn't visible while connecting. 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe