Skip to content

Commit 926bb42

Browse files
committed
parted: backport upstream C23 fix
Without the change the build against c23 compiler (like `gcc-15`) fails as: parted> parted.c: In function '_init_commands': parted> parted.c:2469:9: error: passing argument 2 of 'command_create' from incompatible pointer type [] parted> 2469 | do_version, parted> | ^~~~~~~~~~ parted> | | parted> | int (*)(void)
1 parent 247b802 commit 926bb42

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkgs/by-name/pa/parted/package.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
stdenv,
44
fetchurl,
5+
fetchpatch,
56
lvm2,
67
libuuid,
78
gettext,
@@ -24,6 +25,15 @@ stdenv.mkDerivation rec {
2425
sha256 = "sha256-O0Pb4zzKD5oYYB66tWt4UrEo7Bo986mzDM3l5zNZ5hI=";
2526
};
2627

28+
patches = [
29+
# Fix the build against C23 compilers (like gcc-15):
30+
(fetchpatch {
31+
name = "c23.patch";
32+
url = "https://git.savannah.gnu.org/gitweb/?p=parted.git;a=patch;h=16343bda6ce0d41edf43f8dac368db3bbb63d271";
33+
hash = "sha256-8FgnwMrzMHPZNU+b/mRHCSu8sn6H7GhVLIhMUel40Hk=";
34+
})
35+
];
36+
2737
outputs = [
2838
"out"
2939
"dev"

0 commit comments

Comments
 (0)