From 323636a6aff45a48dd7a5c284fdae6d9a8e86d36 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Mon, 4 Aug 2025 14:20:41 +0000 Subject: [PATCH] krb5: Fix build with gcc=15 --- pkgs/development/libraries/kerberos/krb5.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix index 790efc6865ef..0746b818b545 100644 --- a/pkgs/development/libraries/kerberos/krb5.nix +++ b/pkgs/development/libraries/kerberos/krb5.nix @@ -53,8 +53,13 @@ stdenv.mkDerivation rec { # stdenv will take care of overriding bindir, sbindir, etc. such that "out" contains the binaries. prefix = builtins.placeholder "lib"; - env = lib.optionalAttrs stdenv.hostPlatform.isStatic { - NIX_CFLAGS_COMPILE = "-fcommon"; + env = { + # The release 1.21.3 is not compatible with c23, which changed the meaning of + # + # void foo(); + # + # declaration. + NIX_CFLAGS_COMPILE = "-std=gnu17" + lib.optionalString stdenv.hostPlatform.isStatic " -fcommon"; }; configureFlags = [