diff options
-rw-r--r-- | lib/librthread/rthread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c index 98988c63ab4..ad51a7db1ea 100644 --- a/lib/librthread/rthread.c +++ b/lib/librthread/rthread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread.c,v 1.13 2005/12/21 00:53:28 tedu Exp $ */ +/* $OpenBSD: rthread.c,v 1.14 2005/12/21 23:44:56 marco Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -133,7 +133,8 @@ alloc_stack(size_t len, void *base) } } #ifdef MACHINE_STACK_GROWS_UP - stack->sp = (void *)(((size_t)stack->base + 16) & ~15); + stack->sp = (void *)(((size_t)stack->base + MACHINE_STACK_ALIGN) & + ~(MACHINE_STACK_ALIGN - 1)); #else stack->sp = (void *)(((size_t)stack->base + len - 16) & ~15); #endif |