]> 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)
committerEugene Gershnik <gershnik@users.noreply.github.com>
Sun, 24 Nov 2024 21:41:48 +0000 (13:41 -0800)
commite47c6f751a7ef87640c61316ada774e8e9cc6b07
tree2a4f52287d7e87956389ca5b627b53bc9c8ca8a7
parentb2c3700e36c490fd7ec74b532a6dcdf2fc8e66d3
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
libuuid/src/uuid_time.c