mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 02:40:08 +00:00
(__pthread_attr_getstack): Return correct address.
This commit is contained in:
parent
38eb40ea11
commit
5a7d27d4f9
@ -258,7 +258,11 @@ int __pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr,
|
||||
/* XXX This function has a stupid definition. The standard specifies
|
||||
no error value but what is if no stack address was set? We simply
|
||||
return the value we have in the member. */
|
||||
#ifndef _STACK_GROWS_UP
|
||||
*stackaddr = (char *) attr->__stackaddr - attr->__stacksize;
|
||||
#else
|
||||
*stackaddr = attr->__stackaddr;
|
||||
#endif
|
||||
*stacksize = attr->__stacksize;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user