summaryrefslogtreecommitdiffstats
path: root/0001-restore-7.0-compatibility.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-08 10:43:15 +0200
committerRemi Collet <remi@php.net>2024-10-08 10:43:15 +0200
commitd256a74edfec7568501fd18e0060f7545124441a (patch)
tree5aca2ed2fd008173248ddf7d7b779976352639f1 /0001-restore-7.0-compatibility.patch
parent9d6b2d38a22e0302b9f7ce697fbb29f1aa4130f2 (diff)
update to 2.0.9HEADmaster
drop patches merged upstream
Diffstat (limited to '0001-restore-7.0-compatibility.patch')
-rw-r--r--0001-restore-7.0-compatibility.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/0001-restore-7.0-compatibility.patch b/0001-restore-7.0-compatibility.patch
new file mode 100644
index 0000000..766e600
--- /dev/null
+++ b/0001-restore-7.0-compatibility.patch
@@ -0,0 +1,28 @@
+From 70f260f6e395af7c6061e2b07ea91b85b28532f1 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Tue, 8 Oct 2024 10:31:48 +0200
+Subject: [PATCH] restore 7.0 compatibility
+
+---
+ provider.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/provider.c b/provider.c
+index f1f8e2a..5f988b5 100644
+--- a/provider.c
++++ b/provider.c
+@@ -960,7 +960,11 @@ SOP_METHOD(generateToken)
+ php_error_docref(NULL, E_WARNING, "Could not gather enough random data, falling back on rand()");
+ }
+ while (reaped < size) {
++#if PHP_VERSION_ID < 70100
++ iv[reaped++] = (char) (255.0 * php_rand() / RAND_MAX);
++#else
+ iv[reaped++] = (char)php_mt_rand_range(0, 255);
++#endif
+ }
+ }
+
+--
+2.46.2
+