summaryrefslogtreecommitdiffstats
path: root/uuid-workaround.patch
diff options
context:
space:
mode:
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 */
+