Skip to content

Commit 069bbf3

Browse files
psumberacmb69
authored andcommitted
Fix zend_fibers.c build with ZEND_FIBER_UCONTEXT
Avoids (Solaris SPARC) issue: zend_fibers.c:77:9: error: unknown type name 'ucontext_t' Closes GH-7773.
1 parent ca3f7b0 commit 069bbf3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PHP NEWS
1313
(cmb)
1414
. Fixed bug GH-7757 (Multi-inherited final constant causes fatal error).
1515
(cmb)
16+
. Fixed zend_fibers.c build with ZEND_FIBER_UCONTEXT. (Petr Sumbera)
1617

1718
- Filter:
1819
. Fixed FILTER_FLAG_NO_RES_RANGE flag. (Yifan Tong)

Zend/zend_fibers.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
# include <valgrind/valgrind.h>
3333
#endif
3434

35+
#ifdef ZEND_FIBER_UCONTEXT
36+
# include <ucontext.h>
37+
#endif
38+
3539
#ifndef ZEND_WIN32
3640
# include <unistd.h>
3741
# include <sys/mman.h>
@@ -118,7 +122,6 @@ static zend_always_inline void zend_fiber_restore_vm_state(zend_fiber_vm_state *
118122
}
119123

120124
#ifdef ZEND_FIBER_UCONTEXT
121-
# include <ucontext.h>
122125
ZEND_TLS zend_fiber_transfer *transfer_data;
123126
#else
124127
/* boost_context_data is our customized definition of struct transfer_t as

0 commit comments

Comments
 (0)