Skip to content

Commit

Permalink
Fix undefined symbol pthread_attr_get_np on Solaris (#13358)
Browse files Browse the repository at this point in the history
Solaris doesn't have pthread_attr_get_np().

Checked on Oracle Solaris 11.4.
  • Loading branch information
petk authored Feb 8, 2024
1 parent c5fbcfa commit 968f048
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Zend/zend_call_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ static bool zend_call_stack_get_netbsd(zend_call_stack *stack)
#endif /* defined(__NetBSD__) */

#if defined(__sun)
# if defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
static bool zend_call_stack_get_solaris_pthread(zend_call_stack *stack)
{
pthread_attr_t attr;
Expand Down Expand Up @@ -694,6 +695,12 @@ static bool zend_call_stack_get_solaris_pthread(zend_call_stack *stack)

return true;
}
# else /* defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) */
static bool zend_call_stack_get_solaris_pthread(zend_call_stack *stack)
{
return false;
}
# endif /* defined(HAVE_PTHREAD_ATTR_GET_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) */

static bool zend_call_stack_get_solaris_proc_maps(zend_call_stack *stack)
{
Expand Down

0 comments on commit 968f048

Please sign in to comment.