diff options
author | 2024-11-17 02:32:13 +0000 | |
---|---|---|
committer | 2024-11-17 02:32:13 +0000 | |
commit | b79ff94a27a41efd3983fa92295f351e952ae589 (patch) | |
tree | 60fb19c58a15caf44e134c1624b6bc3026c7fb61 /app-shells/dash/files/dash-0.5.12-c23-lto.patch | |
parent | app-crypt/pgpdump: fix C23 compat (diff) | |
download | gentoo-b79ff94a27a41efd3983fa92295f351e952ae589.tar.gz gentoo-b79ff94a27a41efd3983fa92295f351e952ae589.tar.bz2 gentoo-b79ff94a27a41efd3983fa92295f351e952ae589.zip |
app-shells/dash: fix C23 compat
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-shells/dash/files/dash-0.5.12-c23-lto.patch')
-rw-r--r-- | app-shells/dash/files/dash-0.5.12-c23-lto.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/app-shells/dash/files/dash-0.5.12-c23-lto.patch b/app-shells/dash/files/dash-0.5.12-c23-lto.patch new file mode 100644 index 000000000000..bd53b4ca18d9 --- /dev/null +++ b/app-shells/dash/files/dash-0.5.12-c23-lto.patch @@ -0,0 +1,36 @@ +https://lore.kernel.org/dash/9f2a8ab063e595188df3fe0546484e5a8156318a.1731810617.git.sam@gentoo.org/ + +From 9f2a8ab063e595188df3fe0546484e5a8156318a Mon Sep 17 00:00:00 2001 +Message-ID: <9f2a8ab063e595188df3fe0546484e5a8156318a.1731810632.git.sam@gentoo.org> +From: Sam James <sam@gentoo.org> +Date: Sun, 17 Nov 2024 02:28:07 +0000 +Subject: [PATCH] bltin: fix timescmd with C23 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +With C23 and LTO, we get the following warning (or error if promoted to such): +``` +src/builtins.c:28:5: error: type of ‘timescmd’ does not match original declaration [-Werror=lto-type-mismatch] + 28 | int timescmd(int, char **); + | ^ +src/bltin/times.c:15:5: note: type mismatch in parameter 1 +src/bltin/times.c:15:5: note: type ‘void’ should match type ‘int’ +``` + +Make the two consistent. This didn't show up before because pre-C23 +had unprototyped functions. +--- a/src/bltin/times.c ++++ b/src/bltin/times.c +@@ -12,7 +12,7 @@ + #endif + #include "system.h" + +-int timescmd() { ++int timescmd(int argc, char *argv[]) { + struct tms buf; + long int clk_tck = sysconf(_SC_CLK_TCK); + int mutime, mstime, mcutime, mcstime; +-- +2.47.0 + |