indent: fix build with clang 13 or newer

This commit is contained in:
Randy Eckenrode 2023-05-10 12:06:13 -04:00
parent 4295779fba
commit 8fa14075fb
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9

View file

@ -16,8 +16,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ texinfo ];
pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
"-Wno-implicit-function-declaration";
env.NIX_CFLAGS_COMPILE = toString (
lib.optional stdenv.cc.isClang "-Wno-implicit-function-declaration"
++ lib.optional (stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc) "13") "-Wno-unused-but-set-variable"
);
hardeningDisable = [ "format" ];