diff options
Diffstat (limited to 'nptl/pthread_attr_getstack.c')
-rw-r--r-- | nptl/pthread_attr_getstack.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nptl/pthread_attr_getstack.c b/nptl/pthread_attr_getstack.c index 3f4fd8d40a..4c1a098bab 100644 --- a/nptl/pthread_attr_getstack.c +++ b/nptl/pthread_attr_getstack.c @@ -32,7 +32,11 @@ __pthread_attr_getstack (attr, stackaddr, stacksize) iattr = (struct pthread_attr *) attr; /* Store the result. */ +#ifdef _STACK_GROWS_DOWN *stackaddr = (char *) iattr->stackaddr - iattr->stacksize; +#else + *stackaddr = (char *) iattr->stackaddr; +#endif *stacksize = iattr->stacksize; return 0; |