--- origsrc/zlib-1.2.7/contrib/minizip/Makefile.am	2012-03-26 23:17:41.000000000 -0400
+++ src/zlib-1.2.7/contrib/minizip/Makefile.am	2012-05-13 00:10:19.745354100 -0400
@@ -22,7 +22,8 @@ libminizip_la_SOURCES = \
 	zip.c \
 	${iowin32_src}
 
-libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
+libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -no-undefined
+libminizip_la_LIBADD = -lz
 
 minizip_includedir = $(includedir)/minizip
 minizip_include_HEADERS = \
--- origsrc/zlib-1.2.7/contrib/minizip/ioapi.c	2012-01-21 14:58:45.000000000 -0500
+++ src/zlib-1.2.7/contrib/minizip/ioapi.c	2012-05-13 00:10:19.759354900 -0400
@@ -14,7 +14,7 @@
         #define _CRT_SECURE_NO_WARNINGS
 #endif
 
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
+#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__CYGWIN__)
 // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
 #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
 #define FTELLO_FUNC(stream) ftello(stream)
--- origsrc/zlib-1.2.7/contrib/minizip/miniunz.c	2010-07-18 12:04:24.000000000 -0400
+++ src/zlib-1.2.7/contrib/minizip/miniunz.c	2012-05-13 00:10:19.786356400 -0400
@@ -27,7 +27,7 @@
         #endif
 #endif
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__CYGWIN__)
 // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
 #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
 #define FTELLO_FUNC(stream) ftello(stream)
@@ -97,7 +97,7 @@ void change_file_date(filename,dosdate,t
   SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
   CloseHandle(hFile);
 #else
-#ifdef unix || __APPLE__
+#if defined(unix) || defined(__APPLE__)
   struct utimbuf ut;
   struct tm newdate;
   newdate.tm_sec = tmu_date.tm_sec;
--- origsrc/zlib-1.2.7/contrib/minizip/minizip.c	2012-01-21 15:00:26.000000000 -0500
+++ src/zlib-1.2.7/contrib/minizip/minizip.c	2012-05-13 00:10:19.814358000 -0400
@@ -28,7 +28,7 @@
         #endif
 #endif
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__CYGWIN__)
 // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
 #define FOPEN_FUNC(filename, mode) fopen(filename, mode)
 #define FTELLO_FUNC(stream) ftello(stream)
@@ -94,7 +95,7 @@ uLong filetime(f, tmzip, dt)
   return ret;
 }
 #else
-#ifdef unix || __APPLE__
+#if defined(unix) || defined(__APPLE__)
 uLong filetime(f, tmzip, dt)
     char *f;               /* name of file to get info on */
     tm_zip *tmzip;         /* return value: access, modific. and creation times */
