]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libuuid: fix uuid_time on macOS without attribute((alias))
authorEugene Gershnik <gershnik@users.noreply.github.com>
Mon, 6 May 2024 16:29:39 +0000 (09:29 -0700)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Apr 2025 10:53:06 +0000 (12:53 +0200)
commitf59b47d44ecef8a7697d5e1cbfa2038a11a11373
treeacccf0f32eb06f65f751f7d90fc15ea0b15e5fb2
parent9d4df7905ec03c3ea6e9bdf0aaa91e862168d29a
libuuid: fix uuid_time on macOS without attribute((alias))

Weak aliases are not supported by clang on Darwin.
Instead this fix uses inline asm to make `_uuid_time` an alias to
`___uuid_time`

It appears that on macOS the time API is purely 32 or 64 bit depending
on the build type. There is no ABI issue on that platform and `uuid_time`
can be unconditionally aliased to `_uuid_time`. This is all conjectural,
however, since I have no ability to make 32-bit builds for macOS - the
Apple toolchain doesn't support this since 2019.

Fixes util-linux/util-linux#2873

(cherry picked from commit e47c6f751a7ef87640c61316ada774e8e9cc6b07)
libuuid/src/uuid_time.c