From 429125d305bd970bb33d4544c7e59430c48ee93f Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 30 Mar 2024 18:37:51 +0100 Subject: [PATCH] Zend/zend_call_stack.c: fix build without pthread Fix the following build failure without pthread raised since version 8.3.0 and https://github.com/php/php-src/commit/a11c8a30399e90c17c287b9656c0077bc5131c9c: /home/buildroot/instance-0/output-1/build/php-8.3.4/Zend/zend_call_stack.c:39:11: fatal error: pthread.h: No such file or directory 39 | # include | ^~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/a4ef648a9da50b26ed56d5d490e4cf5a1bfff970 Signed-off-by: Fabrice Fontaine --- Zend/zend_call_stack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/zend_call_stack.c b/Zend/zend_call_stack.c index 06ee521911160..702aad77ce9a1 100644 --- a/Zend/zend_call_stack.c +++ b/Zend/zend_call_stack.c @@ -35,7 +35,8 @@ # include # endif #endif /* ZEND_WIN32 */ -#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) +#if (defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK)) || \ + defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) # include #endif #ifdef __FreeBSD__