From 6810156f7df0d1de951596967519ab9127dd6e68 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 11 Feb 2024 09:18:19 +0000 Subject: [PATCH] stenc: fix `gcc-13` build failure Without the change build fails on` master` as https://hydra.nixos.org/build/247722183: In file included from main.cpp:17: scsiencrypt.h:357:21: error: 'uint8_t' has not been declared 357 | uint8_t *buffer); | ^~~~~~~ --- pkgs/tools/backup/stenc/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/backup/stenc/default.nix b/pkgs/tools/backup/stenc/default.nix index fe45720ee814..fb8d71c73119 100644 --- a/pkgs/tools/backup/stenc/default.nix +++ b/pkgs/tools/backup/stenc/default.nix @@ -16,6 +16,13 @@ stdenv.mkDerivation rec { sha256 = "GcCRVkv+1mREq3MhMRn5fICthwI4WRQJSP6InuzxP1Q="; }; + postPatch = '' + # Fix gcc-13 build by pulling missing header. UPstream also fixed it + # in next major version, but there are many other patch dependencies. + # TODO: remove on next major version update + sed -e '1i #include ' -i src/scsiencrypt.h + ''; + nativeBuildInputs = [ autoreconfHook ]; passthru.updateScript = gitUpdater { };