Commit 98afe02b authored by Jan Philipp Tebernum's avatar Jan Philipp Tebernum Committed by Bjørn Forsman
Browse files

stlink: patch incorrect calloc argument order

With the update to GCC 14, stlink v1.8.0 is broken, as GCC 14 enforces
the correct argument order of calloc. This commit adds a little patch to
resolve that issue for now. This patch should be removed and stlink
updated to v1.8.1 as soon as that version gets released.
parent 1a571dc1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  libusb1,
  gtk3,
@@ -30,6 +31,15 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-hlFI2xpZ4ldMcxZbg/T5/4JuFFdO9THLcU0DQKSFqrw=";
  };

  patches = [
    (fetchpatch {
      name = "calloc-argument-order.patch";
      url = "https://github.com/stlink-org/stlink/commit/6a6718b3342b6c5e282a4e33325b9f97908a0692.patch";
      includes = [ "src/stlink-lib/chipid.c" ];
      sha256 = "sha256-sAfcrDdoKy5Gl1o/PHEUr8uL9OBq0g1nfRe7Y0ijWAM=";
    })
  ];

  buildInputs =
    [
      libusb1'