mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
time: 1.9 -> 1.10
Changes: https://lists.gnu.org/archive/html/bug-time/2026-04/msg00003.html
This commit is contained in:
@@ -6,21 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "time";
|
||||
version = "1.9";
|
||||
version = "1.10";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/time/time-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-+6zwyB5iQp3z4zvaTO44dWYE8Y4B2XczjiMwaj47Uh4=";
|
||||
url = "mirror://gnu/time/time-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-cGv3uERMqeuQN+ntoY4dDrfCMnrn2MLOOkgjxfgMexE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fixes cross-compilation to riscv64-linux
|
||||
./time-1.9-implicit-func-decl-clang.patch
|
||||
# https://lists.gnu.org/archive/html/bug-time/2025-10/msg00000.html
|
||||
# fix compilation with gcc15
|
||||
./time-1.9-fix-sighandler-prototype-for-c23.patch
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"info"
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
In C23 functions with empty argument list in the prototype are treated
|
||||
as taking no arguments. This means that the `int` argument of the
|
||||
sighandler must be specified explicitly or the code will fail to
|
||||
compile due to mismatched function type.
|
||||
|
||||
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
|
||||
---
|
||||
This fixes the same issue as
|
||||
<https://lists.gnu.org/archive/html/bug-time/2025-01/msg00000.html> and
|
||||
<https://lists.gnu.org/archive/html/bug-time/2025-03/msg00000.html> but does not
|
||||
rely on `sighandler_t` which is a GNU extension.
|
||||
|
||||
src/time.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/time.c b/src/time.c
|
||||
index 7b401bc..88287dd 100644
|
||||
--- a/src/time.c
|
||||
+++ b/src/time.c
|
||||
@@ -77,7 +77,7 @@ enum
|
||||
|
||||
|
||||
/* A Pointer to a signal handler. */
|
||||
-typedef RETSIGTYPE (*sighandler) ();
|
||||
+typedef RETSIGTYPE (*sighandler) (int);
|
||||
|
||||
/* msec = milliseconds = 1/1,000 (1*10e-3) second.
|
||||
usec = microseconds = 1/1,000,000 (1*10e-6) second. */
|
||||
--
|
||||
2.51.0
|
||||
@@ -1,24 +0,0 @@
|
||||
https://lists.gnu.org/archive/html/bug-time/2022-08/msg00001.html
|
||||
|
||||
From c8deae54f92d636878097063b411af9fb5262ad3 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 15 Aug 2022 07:24:24 -0700
|
||||
Subject: [PATCH] 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]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
--- a/src/resuse.c
|
||||
+++ b/src/resuse.c
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
+#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
Reference in New Issue
Block a user