From 94bdc4bbbb1ae53474c219a1770385b9c6a92082 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Wed, 22 May 2024 09:21:16 -0700 Subject: zip: fix forward declaration errors with clang (#313305) Ref: https://github.com/NixOS/nixpkgs/issues/313300 --- pkgs/tools/archivers/zip/default.nix | 2 ++ pkgs/tools/archivers/zip/fix-time.h-not-included.patch | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 pkgs/tools/archivers/zip/fix-time.h-not-included.patch (limited to 'pkgs') diff --git a/pkgs/tools/archivers/zip/default.nix b/pkgs/tools/archivers/zip/default.nix index 8a81691d64488..a192b38785049 100644 --- a/pkgs/tools/archivers/zip/default.nix +++ b/pkgs/tools/archivers/zip/default.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { # Buffer overflow on Unicode characters in path names # https://bugzilla.redhat.com/show_bug.cgi?id=2165653 ./buffer-overflow-on-utf8-rh-bug-2165653.patch + # Fixes forward declaration errors with timezone.c + ./fix-time.h-not-included.patch ] ++ lib.optionals (enableNLS && !stdenv.isCygwin) [ ./natspec-gentoo.patch.bz2 ]; buildInputs = lib.optional enableNLS libnatspec diff --git a/pkgs/tools/archivers/zip/fix-time.h-not-included.patch b/pkgs/tools/archivers/zip/fix-time.h-not-included.patch new file mode 100644 index 0000000000000..9db8d66e9a10f --- /dev/null +++ b/pkgs/tools/archivers/zip/fix-time.h-not-included.patch @@ -0,0 +1,10 @@ +--- zip30/timezone.c 2024-05-21 05:14:55.959957517 +0000 ++++ zip30/timezone.c 2024-05-21 05:15:14.852006815 +0000 +@@ -41,6 +41,7 @@ + #include "timezone.h" + #include + #include ++#include + + #ifdef IZTZ_DEFINESTDGLOBALS + long timezone = 0; -- cgit 1.4.1