u2ps: fix build with gcc 15 (#519570)

This commit is contained in:
yaya
2026-05-13 06:58:07 +00:00
committed by GitHub
+6
View File
@@ -16,6 +16,12 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-sa0CL47PwYVDykxzF8KeWhz7HXAX6jZ0AcfecD+aFyg=";
};
postPatch = ''
# Fix for newer C standards
substituteInPlace u2ps.h \
--replace-fail "typedef unsigned char bool;" "#include <stdbool.h>"
'';
buildInputs = [ ghostscript_headless ];
# gcc 15 defaults to C23 where bool is a keyword; u2ps does `typedef unsigned char bool;`