diff options
author | Felix Uhl <github@mail.felix-uhl.de> | 2024-03-06 00:18:24 +0100 |
---|---|---|
committer | Felix Uhl <github@mail.felix-uhl.de> | 2024-03-08 23:16:33 +0100 |
commit | 8f41fb68ff7443836f280323674a6a4a5e7fa0a3 (patch) | |
tree | b581fefa8d7087ee5390ad79077617e6e6de56f5 /pkgs/tools/compression | |
parent | 43d259f8d726113fac056e8bb17d5ac2dea3e0a8 (diff) |
zsync: fix build with clang
I originally found the fix in [this HomeBrew formula](https://github.com/Homebrew/homebrew-core/blob/f800f85efed9312a1abc5fcf7f1269576a3f2d95/Formula/z/zsync.rb#L32). I tested the built binary like this: zsync http://cdimage.ubuntu.com/ubuntu/daily-live/current/noble-desktop-amd64.iso.zsync Aborting the download and starting it again worked, it continued at the same percentage mark. So I'm very certain that the compilation error really is a mistake, and suppressing it is not an issue.
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r-- | pkgs/tools/compression/zsync/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/tools/compression/zsync/default.nix b/pkgs/tools/compression/zsync/default.nix index 0de21cb9c7364..94aa7acce2e09 100644 --- a/pkgs/tools/compression/zsync/default.nix +++ b/pkgs/tools/compression/zsync/default.nix @@ -9,6 +9,12 @@ stdenv.mkDerivation rec { sha256 = "1wjslvfy76szf0mgg2i9y9q30858xyjn6v2acc24zal76d1m778b"; }; + env = lib.optionalAttrs stdenv.cc.isClang { + # Suppress error "call to undeclared library function 'strcasecmp'" during compilation. + # The function is found by the linker correctly, so this doesn't introduce any issues. + NIX_CFLAGS_COMPILE = " -Wno-implicit-function-declaration"; + }; + makeFlags = [ "AR=${stdenv.cc.bintools.targetPrefix}ar" ]; meta = with lib; { |