]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libuuid: support non-cached scenarios (when -lpthread is unavailable)
authorKarel Zak <kzak@redhat.com>
Mon, 27 Jan 2025 13:28:36 +0000 (14:28 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 27 Jan 2025 13:28:36 +0000 (14:28 +0100)
commitbec26c732889b24fb6725e949e181bcf56d23c76
tree58ae7b5ddb73da1d21b91b1eef1bc58877d034d1
parent49e57bee467685b8cf044a6cae811a4f258eaadd
libuuid: support non-cached scenarios (when -lpthread is unavailable)

This patch makes the dependence on pthread optional for libuuid. In
certain cases, such as Buildroot Linux, uClibc-ng, and very low
resource systems, libpthread may be unavailable.

If libuuid is compiled without pthread, it will not use a local cache
and will instead request a UUID from uuidd for each call. This may
result in less efficient performance, but the UUIDs generated will
still be unique and reliable.

On minimalistic systems, it is highly likely that uuidd will not be
installed, making this change important for portability and robust
code.

Addresses: https://github.com/util-linux/util-linux/pull/3375
Signed-off-by: Karel Zak <kzak@redhat.com>
libuuid/src/gen_uuid.c