From aef1a40ddb93413f5d522a11a03df3c99bb7c0a4 Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Fri, 10 May 2024 02:26:08 -0700 Subject: [PATCH] ucl: fix on Darwin/with `pkgsLLVM` Modern clang versions error with `-Wimplicit-function-declaration` [by default]; this causes `ucl`'s `configure` scripts check for ANSI C headers (`stddef.h`) to fail because its test assumes `exit` is implicitly declared leading to build failures: ```console checking for ANSI C header files... no ``` [by default]: https://reviews.llvm.org/D122983 --- pkgs/development/libraries/ucl/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/ucl/default.nix b/pkgs/development/libraries/ucl/default.nix index 048f35868cda..d8e05e9374bf 100644 --- a/pkgs/development/libraries/ucl/default.nix +++ b/pkgs/development/libraries/ucl/default.nix @@ -9,8 +9,9 @@ stdenv.mkDerivation rec { sha256 = "b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348"; }; - # needed to successfully compile with gcc 6 - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=c90"; + # needed to successfully compile with gcc 6+ and modern clang versions where + # `-Wimplicit-function-declaration` is otherwise on and errors by default + env.CFLAGS = "-std=c89"; meta = { homepage = "http://www.oberhumer.com/opensource/ucl/";