-- __pthread_initial_thread_tos =
-- (char *)(((long)CURRENT_STACK_FRAME + getpagesize()) & ~(getpagesize() - 1));
-+ if (__pthread_initial_thread_tos == NULL) {
-+ __pthread_initial_thread_tos =
-+ (char *)(((long)CURRENT_STACK_FRAME + getpagesize()) & ~(getpagesize() - 1));
-+ }
-+
+ __pthread_initial_thread_mid = CURRENT_STACK_FRAME;
+- __pthread_initial_thread_tos = (char *) -1;
++ if (__pthread_initial_thread_tos == NULL)
++ __pthread_initial_thread_tos = (char *) -1;