Skip to content

Commit

Permalink
stlink: patch incorrect calloc argument order
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jpteb committed Dec 28, 2024
1 parent dbbdd0b commit 4619390
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/development/tools/misc/stlink/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
libusb1,
gtk3,
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 4619390

Please sign in to comment.