threads 1.32
[p5sagit/p5-mst-13.2.git] / ext / threads / threads.xs
index e85c6c7..de571de 100755 (executable)
@@ -620,11 +620,14 @@ S_ithread_create(
         /* Try to get thread's actual stack size */
         {
             size_t stacksize;
-            if (! pthread_attr_getstacksize(&attr, &stacksize)) {
-                if (stacksize) {
+#ifdef HPUX1020
+            stacksize = pthread_attr_getstacksize(attr);
+#else
+            if (! pthread_attr_getstacksize(&attr, &stacksize))
+#endif
+                if (stacksize > 0) {
                     thread->stack_size = (IV)stacksize;
                 }
-            }
         }
 #  endif
     }