diff options
Diffstat (limited to 'lib/libpthread/thread/thr_stack.c')
-rw-r--r-- | lib/libpthread/thread/thr_stack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_stack.c b/lib/libpthread/thread/thr_stack.c index f14289e..530e2b9 100644 --- a/lib/libpthread/thread/thr_stack.c +++ b/lib/libpthread/thread/thr_stack.c @@ -200,8 +200,9 @@ _thr_stack_alloc(struct pthread_attr *attr) _kse_critical_leave(crit); /* Map the stack, but not the guard page: */ - if (mmap(attr->stackaddr_attr, stacksize, - PROT_READ | PROT_WRITE, MAP_STACK, -1, 0) == MAP_FAILED) + if ((attr->stackaddr_attr = mmap(attr->stackaddr_attr, + stacksize, PROT_READ | PROT_WRITE, MAP_STACK, + -1, 0)) == MAP_FAILED) attr->stackaddr_attr = NULL; } if (attr->stackaddr_attr != NULL) |