Skip to content

Commit 32ebc6d

Browse files
committed
Fix GH-8142: CYGWIN build.
pcntl: SIGPOLL/si_band unsupported. int ext: enables the signal apis with `_POSIX_C_SOURCE`.
1 parent 41461cf commit 32ebc6d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ext/intl/config.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ if test "$PHP_INTL" != "no"; then
8585
PHP_REQUIRE_CXX()
8686
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
8787
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
88+
case $host_alias in
89+
*cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"
90+
esac
8891
if test "$ext_shared" = "no"; then
8992
PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
9093
else

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ static void pcntl_siginfo_to_zval(int signo, siginfo_t *siginfo, zval *user_sigi
11601160
case SIGBUS:
11611161
add_assoc_double_ex(user_siginfo, "addr", sizeof("addr")-1, (zend_long)siginfo->si_addr);
11621162
break;
1163-
#ifdef SIGPOLL
1163+
#if defined(SIGPOLL) && !defined(__CYGWIN__)
11641164
case SIGPOLL:
11651165
add_assoc_long_ex(user_siginfo, "band", sizeof("band")-1, siginfo->si_band);
11661166
# ifdef si_fd

0 commit comments

Comments
 (0)