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.
This commit is contained in:
Petr Sumbera 2021-12-14 10:57:22 +01:00 committed by Christoph M. Becker
parent ca3f7b0a73
commit 069bbf3e80
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6
2 changed files with 5 additions and 1 deletions

1
NEWS
View File

@ -13,6 +13,7 @@ PHP NEWS
(cmb)
. Fixed bug GH-7757 (Multi-inherited final constant causes fatal error).
(cmb)
. Fixed zend_fibers.c build with ZEND_FIBER_UCONTEXT. (Petr Sumbera)
- Filter:
. Fixed FILTER_FLAG_NO_RES_RANGE flag. (Yifan Tong)

View File

@ -32,6 +32,10 @@
# include <valgrind/valgrind.h>
#endif
#ifdef ZEND_FIBER_UCONTEXT
# include <ucontext.h>
#endif
#ifndef ZEND_WIN32
# include <unistd.h>
# include <sys/mman.h>
@ -118,7 +122,6 @@ static zend_always_inline void zend_fiber_restore_vm_state(zend_fiber_vm_state *
}
#ifdef ZEND_FIBER_UCONTEXT
# include <ucontext.h>
ZEND_TLS zend_fiber_transfer *transfer_data;
#else
/* boost_context_data is our customized definition of struct transfer_t as