From 16eff406bcb932e25e7ac71aec808b7e47197291 Mon Sep 17 00:00:00 2001 From: 7c6f434c <7c6f434c@mail.ru> Date: Sat, 3 Jan 2026 00:21:06 +0100 Subject: [PATCH] mlterm: force c17 on gcc to fix build with gcc15 --- pkgs/by-name/ml/mlterm/package.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ml/mlterm/package.nix b/pkgs/by-name/ml/mlterm/package.nix index aad72f74a164..6bf34c6aa950 100644 --- a/pkgs/by-name/ml/mlterm/package.nix +++ b/pkgs/by-name/ml/mlterm/package.nix @@ -181,8 +181,12 @@ stdenv.mkDerivation (finalAttrs: { --replace "-m 4755 -o root" " " ''; - env = lib.optionalAttrs stdenv.cc.isClang { - NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types"; + env = { + NIX_CFLAGS_COMPILE = + (lib.optionalString stdenv.cc.isClang "-Wno-error=int-conversion -Wno-error=incompatible-function-pointer-types ") + # GCC15 defaults to C23 which is stricter about prototypes + # There are upstream fixes, but they are not in 3.9.4 release + + (lib.optionalString stdenv.cc.isGNU " -std=c17 "); }; configureFlags = [