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 = [