Skip to content

Commit c76fb91

Browse files
gh-154389: Do not use uuid_create() on OpenBSD (GH-154390)
Like NetBSD, OpenBSD generates version 4 UUIDs in uuid_create(), so it cannot be used for uuid.uuid1(). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b6abee5 commit c76fb91

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix :func:`uuid.uuid1` on OpenBSD:
2+
it returned a version 4 UUID,
3+
because ``uuid_create()`` generates random UUIDs on this platform.

configure

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4070,9 +4070,10 @@ AS_VAR_IF([ac_cv_have_uuid_generate_time_safe], [yes], [
40704070
AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE], [1])
40714071
])
40724072

4073-
# gh-124228: While the libuuid library is available on NetBSD, it supports only UUID version 4.
4073+
# gh-124228: While the libuuid library is available on NetBSD and OpenBSD,
4074+
# it supports only UUID version 4.
40744075
# This restriction inhibits the proper generation of time-based UUIDs.
4075-
if test "$ac_sys_system" = "NetBSD"; then
4076+
if test "$ac_sys_system" = "NetBSD" || test "$ac_sys_system" = "OpenBSD"; then
40764077
have_uuid=missing
40774078
AC_DEFINE([HAVE_UUID_H], [0])
40784079
fi

0 commit comments

Comments
 (0)