summaryrefslogtreecommitdiff
path: root/sys/src/cmd/5e/sys.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-03-08 21:07:57 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-03-08 21:07:57 +0100
commitf05af31f3685423e5f97fd6c17f6e6cb4fc11f4b (patch)
treec84ff9340d66ab4f7ac3b35361ea52589299e8c2 /sys/src/cmd/5e/sys.c
parent0c005b510506d341e7a8134a4eb2ad48fdbc8168 (diff)
5e: fix amd64
Diffstat (limited to 'sys/src/cmd/5e/sys.c')
-rw-r--r--sys/src/cmd/5e/sys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/cmd/5e/sys.c b/sys/src/cmd/5e/sys.c
index 25e333a2f..e7fd7d755 100644
--- a/sys/src/cmd/5e/sys.c
+++ b/sys/src/cmd/5e/sys.c
@@ -252,13 +252,15 @@ sysbrk(void)
Segment *s;
v = arg(0);
+ if(systrace)
+ fprint(2, "brk(%#lux)\n", v);
if(v >= P->S[SEGSTACK]->start)
sysfatal("bss > stack, wtf?");
if(v < P->S[SEGBSS]->start)
sysfatal("bss length < 0, wtf?");
s = P->S[SEGBSS];
wlock(&s->rw);
- s->dref = realloc(s->dref, v - s->start + 4);
+ s->dref = realloc(s->dref, v - s->start + sizeof(Ref));
if(s->dref == nil)
sysfatal("error reallocating");
s->data = s->dref + 1;
@@ -503,7 +505,7 @@ sysrendezvous(void)
value = arg(1);
if(systrace)
fprint(2, "rendezvous(%#ux, %#ux)\n", tag, value);
- P->R[0] = (u32int) rendezvous((void *) tag, (void *) value);
+ P->R[0] = (u32int) (uintptr)rendezvous((void *) tag, (void *) value);
if(P->R[0] == ~0)
noteerr(0, 1);
}