-
Notifications
You must be signed in to change notification settings - Fork 343
util/uuid: replace with util/token, remove libuuid #2833
Conversation
util/uuid.c
Outdated
|
||
#ifndef HAS_GETENTROPY | ||
static int getentropy(void *buffer, size_t len) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: {
should be on the previous line
Note, DragonFly and NetBSD lack |
The main benefit to |
From the proposed POSIX spec:
Even though they use the same source, |
util/uuid.c
Outdated
|
||
if (!urandom) { | ||
if (!(urandom = fopen("/dev/urandom", "r"))) { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to call wlr_log_errno
here to make it clear something wrong happened.
Marking as a breaking change since this removes |
Hm, actually, it removes |
We can also get rid of libuuid in CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM! Can you squash all commits into a single one, and remove the CI dependencies introduced in bf4e2e0 (in .builds/*.yml
)?
Ah, also please remove libuuid from the README. |
Use 128-bit hexadecimal string tokens generated with /dev/urandom instead of UUIDs for xdg-foreign handles, removing the libuuid dependency. Update readme and CI. Closes swaywm#2830. build: remove xdg-foreign feature With no external dependencies required, there's no reason not to always build it. Remove WLR_HAS_XDG_FOREIGN as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
References: swaywm/wlroots#2833 (cherry picked from commit 1a72049)
References: swaywm/wlroots#2833 (cherry picked from commit 1a72049)
Uses getentropy() when available, otherwise /dev/urandom. Closes #2830