From d4527fa50fa4e181e930c44c3b42747bf388aaaf Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Mon, 6 May 2024 10:37:20 +0530 Subject: [PATCH] Add patch for yar --- extension/BuildPhpExtension/patches/yar.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 extension/BuildPhpExtension/patches/yar.ps1 diff --git a/extension/BuildPhpExtension/patches/yar.ps1 b/extension/BuildPhpExtension/patches/yar.ps1 new file mode 100644 index 0000000..dd89444 --- /dev/null +++ b/extension/BuildPhpExtension/patches/yar.ps1 @@ -0,0 +1,8 @@ +(Get-Content yar_request.c) | ForEach-Object { + $_ -replace 'if \(!BG\(mt_rand_is_seeded\)\) {', +'#if PHP_VERSION_ID < 80200 + if (!BG(mt_rand_is_seeded)) { +#else + if (!RANDOM_G(mt19937_seeded)) { +#endif' +} | Set-Content yar_request.c