Skip to content

Commit 658f28a

Browse files
authored
dmraid: patch dmevent_tool.c to compile on modern gcc versions (#368470)
2 parents 06bf2ec + f298cd7 commit 658f28a

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

pkgs/os-specific/linux/dmraid/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ stdenv.mkDerivation rec {
1616
};
1717

1818
patches =
19-
[ ./hardening-format.patch ]
19+
[
20+
./hardening-format.patch
21+
./fix-dmevent_tool.patch
22+
]
2023
++ lib.optionals stdenv.hostPlatform.isMusl [
2124
(fetchpatch {
2225
url = "https://raw.githubusercontent.com/void-linux/void-packages/fceed4b8e96b3c1da07babf6f67b6ed1588a28b2/srcpkgs/dmraid/patches/006-musl-libc.patch";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--- a/1.0.0.rc16/tools/dmevent_tool.c.old 2024-12-26 18:39:04.294039876 -0700
2+
+++ a/1.0.0.rc16/tools/dmevent_tool.c 2024-12-26 18:45:59.416784807 -0700
3+
@@ -123,7 +123,7 @@
4+
}
5+
6+
/* Increment option counters. */
7+
-static _process_opt(int opt, const char *cmd)
8+
+static int _process_opt(int opt, const char *cmd)
9+
{
10+
struct opt_def_struct {
11+
const char opt; /* Option character. */
12+
@@ -148,7 +148,7 @@
13+
14+
optc[o->type]++;
15+
optc[OPT_SUM]++;
16+
- return;
17+
+ return 0;
18+
}
19+
}
20+

0 commit comments

Comments
 (0)