Merge #235121: unzip: fix configure script when using clang 16
...into staging
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user