xar: fix build on GCC14 (#368920)

This commit is contained in:
Ivan Trubach 2025-02-14 10:12:44 +03:00 committed by GitHub
commit 2c440d7856
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,11 +68,20 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ autoreconfHook ];
# For some reason libxml2 package headers are in subdirectory and thus arent
# picked up by stdenvs C compiler wrapper (see ccWrapper_addCVars). This
# doesnt really belong here and either should be part of libxml2 package or
# libxml2 in Nixpkgs can just fix their header paths.
env.NIX_CFLAGS_COMPILE = "-isystem ${libxml2.dev}/include/libxml2";
env.NIX_CFLAGS_COMPILE = toString (
[
# For some reason libxml2 package headers are in subdirectory and thus arent
# picked up by stdenvs C compiler wrapper (see ccWrapper_addCVars). This
# doesnt really belong here and either should be part of libxml2 package or
# libxml2 in Nixpkgs can just fix their header paths.
"-isystem ${libxml2.dev}/include/libxml2"
]
++ lib.optionals stdenv.cc.isGNU [
# fix build on GCC 14
"-Wno-error=implicit-function-declaration"
"-Wno-error=incompatible-pointer-types"
]
);
buildInputs =
[