summaryrefslogtreecommitdiffstats
path: root/uuid-workaround.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-08-27 16:01:57 +0200
committerRemi Collet <remi@php.net>2024-08-27 16:01:57 +0200
commit3cc75383565539ba875ee8b464a6d4fff9b741ab (patch)
treea4cff4226d8c52d62f01a6973c9b4475e0a5a62f /uuid-workaround.patch
parentbd69fdfea5a09eecae0685d0811f77a84113dc1c (diff)
workaround for recent util-linuxHEADmaster
Diffstat (limited to 'uuid-workaround.patch')
-rw-r--r--uuid-workaround.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/uuid-workaround.patch b/uuid-workaround.patch
new file mode 100644
index 0000000..71a6147
--- /dev/null
+++ b/uuid-workaround.patch
@@ -0,0 +1,28 @@
+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
+@@ -27,6 +27,12 @@
+
+ #ifdef HAVE_UUID
+
++/* workround with define uuid_time uuid_time64 */
++#ifdef uuid_time
++#undef uuid_time
++#define HAVE_TIME64
++#endif
++
+ #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");
+ }
+
++#ifdef HAVE_TIME64
++ RETURN_LONG(uuid_time64(u, NULL));
++#else
+ RETURN_LONG(uuid_time(u, NULL));
++#endif
+ }
+ /* }}} uuid_time */
+