Skip to content

Commit d1fe750

Browse files
committed
Add patch for libssh2 1.5.0
libssh2 1.5.0 adds support for ssh2_send_signal and libssh2 is too old for that on PHP 8.1 and older.
1 parent b35898a commit d1fe750

File tree

1 file changed

+12
-0
lines changed
  • extension/BuildPhpExtension/patches

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$path = "config.w32"
2+
$content = Get-Content $path -Raw
3+
$old = " AC_DEFINE('PHP_SSH2_CHANNEL_SIGNAL', 1);"
4+
$new = @"
5+
if (CHECK_FUNC_IN_HEADER("libssh2.h", "libssh2_channel_signal_ex", PHP_PHP_BUILD + "\\include\\libssh2")) {
6+
AC_DEFINE('PHP_SSH2_CHANNEL_SIGNAL', 1);
7+
}
8+
"@
9+
10+
if ($content.Contains($old)) {
11+
Set-Content $path -Value ($content.Replace($old, $new))
12+
}

0 commit comments

Comments
 (0)