From 126b1705347e8e9670dfceab83df8065758cd0ff Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 30 Sep 2024 14:05:39 +0200 Subject: refresh patch --- uuid-workaround.patch | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'uuid-workaround.patch') diff --git a/uuid-workaround.patch b/uuid-workaround.patch index 5c82105..a41e21a 100644 --- a/uuid-workaround.patch +++ b/uuid-workaround.patch @@ -1,6 +1,6 @@ diff -up uuid-1.2.0/config.m4.orig uuid-1.2.0/config.m4 ---- uuid-1.2.0/config.m4.orig 2024-09-30 12:18:50.826731569 +0200 -+++ uuid-1.2.0/config.m4 2024-09-30 12:20:00.330402220 +0200 +--- uuid-1.2.0/config.m4.orig 2020-10-06 12:50:46.000000000 +0200 ++++ uuid-1.2.0/config.m4 2024-09-30 13:55:26.600108993 +0200 @@ -18,6 +18,7 @@ if test "$PHP_UUID" != "no"; then PHP_CHECK_FUNC_LIB(uuid_variant, uuid) PHP_CHECK_FUNC_LIB(uuid_generate_md5, uuid) @@ -11,18 +11,32 @@ diff -up uuid-1.2.0/config.m4.orig uuid-1.2.0/config.m4 export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_UUID" diff -up uuid-1.2.0/uuid.c.orig uuid-1.2.0/uuid.c --- uuid-1.2.0/uuid.c.orig 2020-10-06 12:50:46.000000000 +0200 -+++ uuid-1.2.0/uuid.c 2024-09-30 12:18:50.826731569 +0200 -@@ -27,6 +27,13 @@ ++++ uuid-1.2.0/uuid.c 2024-09-30 13:56:33.329669413 +0200 +@@ -27,6 +27,15 @@ #ifdef HAVE_UUID -+#if !defined(HAVE_UUID_TIME64) && defined(uuid_time) ++#if defined(uuid_time) +/* workround with define uuid_time uuid_time64 */ +/* Also see https://bugzilla.redhat.com/2315645 */ +#undef uuid_time ++#if !defined(HAVE_UUID_TIME64) +extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); +#endif ++#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 +383,11 @@ PHP_FUNCTION(uuid_time) + VALUE_ERROR(1, "$uuid", "UUID DCE TIME expected"); + } + ++#if defined(HAVE_UUID_TIME64) ++ RETURN_LONG(uuid_time64(u, NULL)); ++#else + RETURN_LONG(uuid_time(u, NULL)); ++#endif + } + /* }}} uuid_time */ + -- cgit