Commit 926bb427 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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)
parent 247b8027
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchurl,
  fetchpatch,
  lvm2,
  libuuid,
  gettext,
@@ -24,6 +25,15 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-O0Pb4zzKD5oYYB66tWt4UrEo7Bo986mzDM3l5zNZ5hI=";
  };

  patches = [
    # Fix the build against C23 compilers (like gcc-15):
    (fetchpatch {
      name = "c23.patch";
      url = "https://git.savannah.gnu.org/gitweb/?p=parted.git;a=patch;h=16343bda6ce0d41edf43f8dac368db3bbb63d271";
      hash = "sha256-8FgnwMrzMHPZNU+b/mRHCSu8sn6H7GhVLIhMUel40Hk=";
    })
  ];

  outputs = [
    "out"
    "dev"