termcap: fix build with gcc15

The ISO C23, which is the default in GCC 15, changes the meaning of an
empty argument list from an unspecified list to no arguments, thus
breaking the build.

This is fixed by switching the language standard to `gnu89` (dialect of
ISO C90).
This commit is contained in:
eljamm
2026-01-12 07:46:41 +01:00
parent 82ba0a3b91
commit ea15d85621
+4 -3
View File
@@ -8,12 +8,12 @@
enableShared ? !stdenv.hostPlatform.isStatic,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "termcap";
version = "1.3.1";
src = fetchurl {
url = "mirror://gnu/termcap/termcap-${version}.tar.gz";
url = "mirror://gnu/termcap/termcap-${finalAttrs.version}.tar.gz";
hash = "sha256-kaDiLlOHykRntbyxjt8cUbkwJi/UZtX9o5bdnSZxkQA=";
};
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
env.NIX_CFLAGS_COMPILE = toString (
[
"-DSTDC_HEADERS"
"-std=gnu89"
]
++ lib.optionals stdenv.cc.isClang [
"-Wno-implicit-function-declaration"
@@ -76,4 +77,4 @@ stdenv.mkDerivation rec {
maintainers = with lib.maintainers; [ wegank ];
platforms = lib.platforms.all;
};
}
})