unzip: -Werror=implicit-function-declaration
authorFredrik Fornwall <fredrik@fornwall.net>
Fri, 7 Jul 2017 00:52:33 +0000 (02:52 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Fri, 7 Jul 2017 00:52:33 +0000 (02:52 +0200)
packages/unzip/unix-configure.patch [new file with mode: 0644]
packages/unzip/unzpriv.h.patch [new file with mode: 0644]

diff --git a/packages/unzip/unix-configure.patch b/packages/unzip/unix-configure.patch
new file mode 100644 (file)
index 0000000..a090e59
--- /dev/null
@@ -0,0 +1,13 @@
+diff -u -r ../unzip60/unix/configure ./unix/configure
+--- ../unzip60/unix/configure  2009-04-16 21:25:12.000000000 +0200
++++ ./unix/configure   2017-07-07 02:49:13.106298790 +0200
+@@ -418,7 +370,9 @@
+ [ $? -ne 0 ] && CFLAGSR="${CFLAGSR} -DNO_ERRNO"
+ echo Check for directory libraries
+ cat > conftest.c << _EOF_
++#include <sys/types.h>
++#include <dirent.h>
+ int main() { return closedir(opendir(".")); }
+ _EOF_
diff --git a/packages/unzip/unzpriv.h.patch b/packages/unzip/unzpriv.h.patch
new file mode 100644 (file)
index 0000000..6ac1e5b
--- /dev/null
@@ -0,0 +1,16 @@
+diff -u -r ../unzip60/unzpriv.h ./unzpriv.h
+--- ../unzip60/unzpriv.h       2009-04-19 23:59:26.000000000 +0000
++++ ./unzpriv.h        2017-07-07 00:38:24.057603217 +0000
+@@ -1284,9 +1284,9 @@
+ #ifdef ZMEM
+ #  undef ZMEM
+-#  define memcmp(b1,b2,len)      bcmp(b2,b1,len)
+-#  define memcpy(dest,src,len)   bcopy(src,dest,len)
+-#  define memzero                bzero
++#  define memcmp(b1,b2,len)      memcmp(b2,b1,len)
++#  define memcpy(b1,b2,len)      (void)(__builtin_memmove((b2), (b1), (len)))
++#  define memzero(b,len)         (void)(__builtin_memset((b), '\0', (len)))
+ #else
+ #  define memzero(dest,len)      memset(dest,0,len)
+ #endif