From 3925a35d86afa37405290ba59a42442643b3b69f Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Wed, 8 Nov 2023 18:21:00 -0500 Subject: [PATCH] lftp: fix build with clang 16 The `configure` script fails to detect several C standard library functions due to not including the required headers. Suppressing the warning about implicit function declarations allows the checks to succeed and lftp build. --- pkgs/tools/networking/lftp/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix index aaa26a38c3ae..637214809d41 100644 --- a/pkgs/tools/networking/lftp/default.nix +++ b/pkgs/tools/networking/lftp/default.nix @@ -18,6 +18,11 @@ stdenv.mkDerivation rec { hardeningDisable = lib.optional stdenv.isDarwin "format"; + env = lib.optionalAttrs stdenv.isDarwin { + # Required to build with clang 16 or `configure` will fail to detect several standard functions. + NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + }; + configureFlags = [ "--with-openssl" "--with-readline=${readline.dev}"