forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util-linux usually provides libuuid, and is preffered by mtd-utils so lets enable building libuuid so we can disable it later in e2fsprogs. Only the static version of library is intentionally built. Link: openwrt#15806 Signed-off-by: Robert Marko <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 9445f477cfcfb3615ffde8f93b1b98c809ee4eca Mon Sep 17 00:00:00 2001 | ||
From: Eugene Gershnik <[email protected]> | ||
Date: Mon, 6 May 2024 09:29:39 -0700 | ||
Subject: [PATCH] This re-enables build on macOS. | ||
|
||
Weak aliases are not supported by clang on Darwin. | ||
Instead this fix uses inline asm to make `_uuid_time` and alias to `___uuid_time` | ||
|
||
Fixes util-linux/util-linux#2873 | ||
--- | ||
libuuid/src/uuid_time.c | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
--- a/libuuid/src/uuid_time.c | ||
+++ b/libuuid/src/uuid_time.c | ||
@@ -85,6 +85,10 @@ time_t __uuid_time(const uuid_t uu, stru | ||
} | ||
#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 |