summaryrefslogtreecommitdiffstats
path: root/uuid-workaround.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-09-30 11:57:05 +0200
committerRemi Collet <remi@php.net>2024-09-30 11:57:05 +0200
commitc3a46aa7918297c251df1a7e6677016b5ad03052 (patch)
tree68f30dc39f7cb858897fbf1dc3948de145e720e2 /uuid-workaround.patch
parent3cc75383565539ba875ee8b464a6d4fff9b741ab (diff)
fix workaround for recent util-linux
see https://bugzilla.redhat.com/2315645
Diffstat (limited to 'uuid-workaround.patch')
-rw-r--r--uuid-workaround.patch55
1 files changed, 42 insertions, 13 deletions
diff --git a/uuid-workaround.patch b/uuid-workaround.patch
index 71a6147..430f54f 100644
--- a/uuid-workaround.patch
+++ b/uuid-workaround.patch
@@ -1,6 +1,16 @@
-diff -up ./uuid.c.orig ./uuid.c
---- ./uuid.c.orig 2020-10-06 12:50:46.000000000 +0200
-+++ ./uuid.c 2024-08-27 15:57:06.551255840 +0200
+From 3080c0be6da7477954862e1ed9a267ce39b268ad Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Tue, 27 Aug 2024 16:04:16 +0200
+Subject: [PATCH 1/2] workround with define uuid_time uuid_time64
+
+---
+ uuid.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/uuid.c b/uuid.c
+index ae024e7..73136f0 100644
+--- a/uuid.c
++++ b/uuid.c
@@ -27,6 +27,12 @@
#ifdef HAVE_UUID
@@ -14,15 +24,34 @@ diff -up ./uuid.c.orig ./uuid.c
#if PHP_VERSION_ID < 80000
#define VALUE_ERROR(n,name,msg) php_error_docref(NULL, E_WARNING, "Argument #%d (%s) %s", n, name, msg); RETURN_FALSE
#define RETURN_THROWS() return
-@@ -374,7 +380,11 @@ PHP_FUNCTION(uuid_time)
- VALUE_ERROR(1, "$uuid", "UUID DCE TIME expected");
- }
+--
+2.46.2
+
+From 77720b2b4c2c57cd18ffc5dbf32a247b6952abed Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Mon, 30 Sep 2024 11:45:34 +0200
+Subject: [PATCH 2/2] fix workaround
+
+---
+ uuid.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/uuid.c b/uuid.c
+index 73136f0..c45aa2a 100644
+--- a/uuid.c
++++ b/uuid.c
+@@ -28,9 +28,10 @@
+ #ifdef HAVE_UUID
-+#ifdef HAVE_TIME64
-+ RETURN_LONG(uuid_time64(u, NULL));
-+#else
- RETURN_LONG(uuid_time(u, NULL));
-+#endif
- }
- /* }}} uuid_time */
+ /* workround with define uuid_time uuid_time64 */
++/* Also see https://bugzilla.redhat.com/2315645 */
+ #ifdef uuid_time
+ #undef uuid_time
+-#define HAVE_TIME64
++extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
+ #endif
+ #if PHP_VERSION_ID < 80000
+--
+2.46.2
+