diff --git a/pkgs/development/libraries/cjson/default.nix b/pkgs/development/libraries/cjson/default.nix index 1a5d4b77f6c..b75b91508cb 100644 --- a/pkgs/development/libraries/cjson/default.nix +++ b/pkgs/development/libraries/cjson/default.nix @@ -13,6 +13,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + # cJSON actually uses C99 standard, not C89 + # https://github.com/DaveGamble/cJSON/issues/275 + postPatch = '' + substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99 + ''; + meta = with lib; { homepage = "https://github.com/DaveGamble/cJSON"; description = "Ultralightweight JSON parser in ANSI C";