Skip to content

Commit

Permalink
workround with define uuid_time uuid_time64
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Aug 27, 2024
1 parent dca77fa commit 3080c0b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -344,7 +350,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 */
#endif /* HAVE_UUID_TIME */
Expand Down

0 comments on commit 3080c0b

Please sign in to comment.