From d256a74edfec7568501fd18e0060f7545124441a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Oct 2024 10:43:15 +0200 Subject: update to 2.0.9 drop patches merged upstream --- 0001-restore-7.0-compatibility.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 0001-restore-7.0-compatibility.patch (limited to '0001-restore-7.0-compatibility.patch') 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 +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 + -- cgit