Index: qtdeclarative/src/qml/jsruntime/qv4engine.cpp =================================================================== --- qtdeclarative.orig/src/qml/jsruntime/qv4engine.cpp +++ qtdeclarative/src/qml/jsruntime/qv4engine.cpp @@ -84,6 +84,10 @@ #if HAVE(PTHREAD_NP_H) # include #endif +# if OS(SOLARIS) +# include +# include +# endif #endif QT_BEGIN_NAMESPACE @@ -113,6 +117,19 @@ quintptr getStackLimit() } else size = pthread_get_stacksize_np(thread_self); stackLimit -= size; +# elif OS(SOLARIS) + stack_t ss; + int rc; + do { + rc = thr_stksegment(&ss); // can fail only with EAGAIN + } while ((rc != 0) && (errno == EAGAIN)); + // Is stack "unlimited" ? + if (ss.ss_size == RLIM_INFINITY) { + stackLimit = 0xFFFF800000000000L; + } else { + stackLimit = reinterpret_cast(ss.ss_sp); + stackLimit -= ss.ss_size; + } # else void* stackBottom = 0; pthread_attr_t attr;