Skip to content

Commit 968f048

Browse files
authored
Fix undefined symbol pthread_attr_get_np on Solaris (#13358)
Solaris doesn't have pthread_attr_get_np(). Checked on Oracle Solaris 11.4.
1 parent c5fbcfa commit 968f048

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Zend/zend_call_stack.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ static bool zend_call_stack_get_netbsd(zend_call_stack *stack)
664664
#endif /* defined(__NetBSD__) */
665665

666666
#if defined(__sun)
667+
# if defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
667668
static bool zend_call_stack_get_solaris_pthread(zend_call_stack *stack)
668669
{
669670
pthread_attr_t attr;
@@ -694,6 +695,12 @@ static bool zend_call_stack_get_solaris_pthread(zend_call_stack *stack)
694695

695696
return true;
696697
}
698+
# else /* defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) */
699+
static bool zend_call_stack_get_solaris_pthread(zend_call_stack *stack)
700+
{
701+
return false;
702+
}
703+
# endif /* defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) */
697704

698705
static bool zend_call_stack_get_solaris_proc_maps(zend_call_stack *stack)
699706
{

0 commit comments

Comments
 (0)