From a4dae0fa2d566a6b7bdda938c4d94a4d8b8e8dcf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 19 Mar 2025 01:16:03 -0700 Subject: [PATCH] time: Fix build with musl Signed-off-by: Khem Raj Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- .../0001-Fix-the-type-for-sighandler_t.patch | 27 +++++++++++++++++++ meta/recipes-extended/time/time_1.9.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch diff --git a/meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch b/meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch new file mode 100644 index 00000000000..0f8bf6e03e0 --- /dev/null +++ b/meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch @@ -0,0 +1,27 @@ +From cfef684e2c2c93c4a871d6c2a7af8f4c1b7c6741 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 18 Mar 2025 09:29:58 -0700 +Subject: [PATCH] Fix the type for sighandler_t + +__sighandler_t is private interface in glibc so its +better to not use it, as an aside fixes build with musl + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-time/2025-03/msg00000.html] +Signed-off-by: Khem Raj +--- + src/time.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/time.c b/src/time.c +index 7ff29a4..82eb66a 100644 +--- a/src/time.c ++++ b/src/time.c +@@ -728,7 +728,7 @@ run_command (cmd, resp) + RESUSE *resp; + { + pid_t pid; /* Pid of child. */ +- __sighandler_t interrupt_signal, quit_signal; ++ sighandler_t interrupt_signal, quit_signal; + int saved_errno; + + resuse_start (resp); diff --git a/meta/recipes-extended/time/time_1.9.bb b/meta/recipes-extended/time/time_1.9.bb index d9e2d06b32d..366a64d8e5d 100644 --- a/meta/recipes-extended/time/time_1.9.bb +++ b/meta/recipes-extended/time/time_1.9.bb @@ -16,6 +16,7 @@ BBCLASSEXTEND = "native nativesdk" SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \ file://0001-include-string.h-for-memset.patch \ file://time-1.9-Fix-compiling-with-GCC15.patch \ + file://0001-Fix-the-type-for-sighandler_t.patch \ " SRC_URI[md5sum] = "d2356e0fe1c0b85285d83c6b2ad51b5f" -- 2.47.3