diff options
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index 1e6b80ae49..19b3fb790f 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -544,6 +544,9 @@ hpux_attr_getstackaddr(const pthread_attr_t *attr, void *addr) # define MAINSTACKADDR_AVAILABLE 0 # endif #endif +#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) +# define get_main_stack(addr, size) get_stack(addr, size) +#endif #ifdef STACKADDR_AVAILABLE /* @@ -685,7 +688,7 @@ ruby_init_stack(volatile VALUE *addr #if MAINSTACKADDR_AVAILABLE void* stackaddr; STACK_GROW_DIR_DETECTION; - if (get_stack(&stackaddr, &size) == 0) { + if (get_main_stack(&stackaddr, &size) == 0) { space = STACK_DIR_UPPER((char *)addr - (char *)stackaddr, (char *)stackaddr - (char *)addr); } native_main_thread.stack_maxsize = size - space; |