[php-src] PHP-8.3: Zend/zend_call_stack.c: fix build for Linux/uclibc-ng without pthread.
| From: | Fabrice Fontaine via David Carlier | Date: | Sat, 30 Mar 2024 22:24:49 +0000 |
| Subject: | [php-src] PHP-8.3: Zend/zend_call_stack.c: fix build for Linux/uclibc-ng without pthread. | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-127905@lists.php.net to get a copy of this message | ||
Author: Fabrice Fontaine (ffontaine)
Committer: David Carlier (devnexen)
Date: 2024-03-30T22:19:02Z
Commit: https://github.com/php/php-src/commit/5a043c26c8522b177687882ea9662566693c76ca
Raw diff: https://github.com/php/php-src/commit/5a043c26c8522b177687882ea9662566693c76ca.diff
Zend/zend_call_stack.c: fix build for Linux/uclibc-ng 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 <pthread.h>
| ^~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/a4ef648a9da50b26ed56d5d490e4cf5a1bfff970
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Close GH-13843
Changed paths:
M NEWS
M Zend/zend_call_stack.c
Diff:
diff --git a/NEWS b/NEWS
index 0e57f4ef489d..2d90993546e3 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.3.6
+- Core:
+ . Fixed zend_call_stack build with Linux/uclibc-ng without thread support.
+ (Fabrice Fontaine)
+
- FPM:
. Fixed bug GH-13563 (Setting bool values via env in FPM config fails).
(Jakub Zelenka)
diff --git a/Zend/zend_call_stack.c b/Zend/zend_call_stack.c
index 06ee52191116..702aad77ce9a 100644
--- a/Zend/zend_call_stack.c
+++ b/Zend/zend_call_stack.c
@@ -35,7 +35,8 @@
# include <sys/types.h>
# 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 <pthread.h>
#endif
#ifdef __FreeBSD__