From e55fda1ae7f9127a44a4d7c7a5151e286601cde7 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 10 Mar 2025 01:14:00 +0100 Subject: [PATCH] tboot: fix build for gcc 14 --- pkgs/by-name/tb/tboot/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/tb/tboot/package.nix b/pkgs/by-name/tb/tboot/package.nix index a553c9d7ca7d..c7425eaaa18a 100644 --- a/pkgs/by-name/tb/tboot/package.nix +++ b/pkgs/by-name/tb/tboot/package.nix @@ -34,6 +34,13 @@ stdenv.mkDerivation rec { substituteInPlace docs/Makefile --replace /usr/share /share ''; + postPatch = '' + # compute the allocated size from the pointed type, to avoid the warning + substituteInPlace lcptools-v2/pconf_legacy.c \ + --replace-fail "digest = malloc(SHA1_DIGEST_SIZE);" \ + "digest = malloc(sizeof *digest);" + ''; + installFlags = [ "DESTDIR=$(out)" ]; meta = with lib; {