Skip to contentSkip to conversation

time: Use upstream applied patches

PATCH Superseded Khem Raj 1 participant 1 message Apr 8

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 time: Use upstream applied patches

time project now has a maintainer and has taken bunch of patches submitted over years, backport the needed ones for compiling with GCC-15 and Clang.

Current patchset was not adequate for clang and moreover the applied patches are slightly different than what we are carrying

---
v2: Reflect correct upstream status for 0001-include-string.h-for-memset.patch

 .../0001-Fix-the-type-for-sighandler_t.patch  |  27 ----
 .../0001-include-string.h-for-memset.patch    |  12 +-
 .../0002-maint-remove-K-R-declarations.patch  | 131 ++++++++++++++++++
 ...t-fix-compilation-errors-with-GCC-15.patch |  65 +++++++++
 ...aint-remove-obsolete-autoconf-macros.patch |  43 ++++++
 .../time-1.9-Fix-compiling-with-GCC15.patch   |  33 -----
 meta/recipes-extended/time/time_1.9.bb        |   5 +-
 7 files changed, 249 insertions(+), 67 deletions(-)
 delete mode 100644 meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch
 create mode 100644 meta/recipes-extended/time/time/0002-maint-remove-K-R-declarations.patch
 create mode 100644 meta/recipes-extended/time/time/0003-maint-fix-compilation-errors-with-GCC-15.patch
 create mode 100644 meta/recipes-extended/time/time/0004-maint-remove-obsolete-autoconf-macros.patch
 delete mode 100644 meta/recipes-extended/time/time/time-1.9-Fix-compiling-with-GCC15.patch
meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch deleted +0 -27
deleted file mode 100644
index 0f8bf6e03e..0000000000
@@ -1,27 +0,0 @@
-From cfef684e2c2c93c4a871d6c2a7af8f4c1b7c6741 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-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 <[email protected]>
----
- 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);
meta/recipes-extended/time/time/0001-include-string.h-for-memset.patch +7 -5
index f6ea212667..a7ab8dc624 100644
@@ -1,13 +1,15 @@
-From c8deae54f92d636878097063b411af9fb5262ad3 Mon Sep 17 00:00:00 2001
+From ebc3368161ee909d5f854af8928e7937e35da41f Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 15 Aug 2022 07:24:24 -0700
-Subject: [PATCH] include string.h for memset()
+Subject: [PATCH 1/4] include string.h for memset()
 
 Fixes implicit function declaration warning e.g.
 
 resuse.c:103:3: error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'
 
-Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-time/2022-08/msg00001.html]
+Drop this patch when upgrading to 1.10+ future releases
+
+Upstream-Status: Inappropriate [Upstream has dropped using memset in reuse.c]
 Signed-off-by: Khem Raj <[email protected]>
 ---
  src/resuse.c | 1 +
@@ -18,8 +20,8 @@ index cf5a08c..9d3d18a 100644
 --- a/src/resuse.c
 +++ b/src/resuse.c
 @@ -22,6 +22,7 @@
- */
-
+ */
+
  #include "config.h"
 +#include <string.h>
  #include <sys/time.h>
meta/recipes-extended/time/time/0002-maint-remove-K-R-declarations.patch new file +131 -0

131 lines not on this page · raw message

meta/recipes-extended/time/time/0003-maint-fix-compilation-errors-with-GCC-15.patch new file +65 -0

65 lines not on this page · raw message

meta/recipes-extended/time/time/0004-maint-remove-obsolete-autoconf-macros.patch new file +43 -0

43 lines not on this page · raw message

meta/recipes-extended/time/time/time-1.9-Fix-compiling-with-GCC15.patch deleted +0 -33
deleted file mode 100644
index 76141aec18..0000000000
@@ -1,33 +0,0 @@
-From 831194f0be7733c99c7a2c69d9e9695b82e05010 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= <[email protected]>
-Date: Thu, 30 Jan 2025 08:48:47 +0100
-Subject: [PATCH] time: fix compiling with GCC15
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GCC15 complains about incompatible pointer type in run_command()
-Initialize interrupt_signal and quit_signal with correct type
-
-Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-time/2025-01/msg00000.html]
-Signed-off-by: Ondřej Pohořelský <[email protected]>
----
- src/time.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/time.c b/src/time.c
-index 7b401bc..c8d7ab0 100644
---- a/src/time.c
-+++ b/src/time.c
-@@ -803,7 +803,7 @@ run_command (cmd, resp)
-      RESUSE *resp;
- {
-   pid_t pid;			/* Pid of child.  */
--  sighandler interrupt_signal, quit_signal;
-+  __sighandler_t interrupt_signal, quit_signal;
-   int saved_errno;
-
-   resuse_start (resp);
---
-2.48.1
-
meta/recipes-extended/time/time_1.9.bb +3 -2
index d6d8aa6e1e..9436a83cca 100644
@@ -15,8 +15,9 @@ 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 \
+           file://0002-maint-remove-K-R-declarations.patch \
+           file://0003-maint-fix-compilation-errors-with-GCC-15.patch \
+           file://0004-maint-remove-obsolete-autoconf-macros.patch \
            "
 
 SRC_URI[sha256sum] = "fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e"