diff options
author | Vladimír Čunát <v@cunat.cz> | 2023-06-11 09:19:28 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2023-06-11 09:19:28 +0200 |
commit | 0d6c7b6f9ce50b7fc7df5c03c320e75ad741ca62 (patch) | |
tree | 18ffe72b160d818f5c8ce571b6435645b7e36321 /pkgs/tools/archivers | |
parent | 2ec150fcb0478fd9f3b7106c283828edc016e1fe (diff) | |
parent | 1364837d91fdf2647a7141f60ee8a78b1e1f16ff (diff) |
Merge #235121: unzip: fix configure script when using clang 16
...into staging
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r-- | pkgs/tools/archivers/unzip/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/archivers/unzip/implicit-declarations-fix.patch | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/unzip/default.nix b/pkgs/tools/archivers/unzip/default.nix index f61bc9df66d58..b0a4484e87f37 100644 --- a/pkgs/tools/archivers/unzip/default.nix +++ b/pkgs/tools/archivers/unzip/default.nix @@ -60,6 +60,9 @@ stdenv.mkDerivation rec { ]; sha256 = "sha256-on79jElQ+z2ULWAq14RpluAqr9d6itHiZwDkKubBzTc="; }) + # Clang 16 makes implicit declarations an error by default for C99 and newer, causing the + # configure script to fail to detect errno and the directory libraries on Darwin. + ./implicit-declarations-fix.patch ] ++ lib.optional enableNLS (fetchurl { url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-arch/unzip/files/unzip-6.0-natspec.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d"; @@ -67,6 +70,7 @@ stdenv.mkDerivation rec { sha256 = "67ab260ae6adf8e7c5eda2d1d7846929b43562943ec4aff629bd7018954058b1"; }); + nativeBuildInputs = [ bzip2 ]; buildInputs = [ bzip2 ] ++ lib.optional enableNLS libnatspec; diff --git a/pkgs/tools/archivers/unzip/implicit-declarations-fix.patch b/pkgs/tools/archivers/unzip/implicit-declarations-fix.patch new file mode 100644 index 0000000000000..df19bf1722f93 --- /dev/null +++ b/pkgs/tools/archivers/unzip/implicit-declarations-fix.patch @@ -0,0 +1,21 @@ +--- a/unix/configure 2009-04-16 15:25:12.000000000 -0400 ++++ b/unix/configure 2023-05-30 15:18:33.670321348 -0400 +@@ -408,7 +408,7 @@ + echo Check for errno declaration + cat > conftest.c << _EOF_ + #include <errno.h> +-main() ++int main() + { + errno = 0; + return 0; +@@ -419,6 +419,8 @@ + + echo Check for directory libraries + cat > conftest.c << _EOF_ ++#include <sys/types.h> ++#include <dirent.h> + int main() { return closedir(opendir(".")); } + _EOF_ + + |