Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.5 kB · 35 lines
123456789101112131415161718192021222324252627282930313233343536From e47c6f751a7ef87640c61316ada774e8e9cc6b07 Mon Sep 17 00:00:00 2001From: Eugene Gershnik <gershnik@users.noreply.github.com>Date: Mon, 6 May 2024 09:29:39 -0700Subject: [PATCH] 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 dependingon 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 - theApple toolchain doesn't support this since 2019.
Fixes util-linux/util-linux#2873--- libuuid/src/uuid_time.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libuuid/src/uuid_time.c b/libuuid/src/uuid_time.cindex 9b415b3ee73..df0478e1909 100644--- a/libuuid/src/uuid_time.c+++ b/libuuid/src/uuid_time.c@@ -85,6 +85,10 @@ time_t __uuid_time(const uuid_t uu, struct timeval *ret_tv) } #if defined(__USE_TIME_BITS64) && defined(__GLIBC__) extern time_t uuid_time64(const uuid_t uu, struct timeval *ret_tv) __attribute__((weak, alias("__uuid_time")));+#elif defined(__clang__) && defined(__APPLE__)+__asm__(".globl _uuid_time");+__asm__(".set _uuid_time, ___uuid_time");+extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); #else extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv) __attribute__((weak, alias("__uuid_time"))); #endif