diff -Nru openjdk.orig/jdk/make/com/sun/java/pack/Makefile openjdk/jdk/make/com/sun/java/pack/Makefile
--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/make/com/sun/java/pack/Makefile	2013-12-18 16:59:48.528719153 +0000
@@ -64,23 +64,21 @@
   ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME)
 
   ZIPOBJS =  $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/deflate.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/trees.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/zadler32.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/zutil.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/inflate.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/infblock.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/infcodes.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/inftrees.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/infutil.$(OBJECT_SUFFIX) \
-	     $(ZIPOBJDIR)/inffast.$(OBJECT_SUFFIX)
-
-  ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
-  OTHER_CXXFLAGS += $(ZINCLUDE)
-  LDDFLAGS += $(ZIPOBJS)
+            $(ZIPOBJDIR)/deflate.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/trees.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/zadler32.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/zutil.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/inflate.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/infblock.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/infcodes.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/inftrees.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/infutil.$(OBJECT_SUFFIX) \
+            $(ZIPOBJDIR)/inffast.$(OBJECT_SUFFIX)
+
+  OTHER_LDLIBS += $(ZLIB_LIBS)
 else
   OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI
-  OTHER_LDLIBS += $(JVMLIB)
+  OTHER_LDLIBS += $(ZLIB_LIBS) $(JVMLIB)
 endif
 
 CXXFLAGS_DBG += -DFULL
@@ -102,12 +100,12 @@
   COMPILER_WARNINGS_FATAL=false
 else
   LDOUTPUT = -o #Have a space 
-  LDDFLAGS += -lc
+  LDDFLAGS += $(ZLIB_LIBS) -lc
   OTHER_LDLIBS  += $(LIBCXX)
 # setup the list of libraries to link in...
 ifeq ($(PLATFORM), linux)
 ifeq ("$(CC_VER_MAJOR)", "3")
-  OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
+  OTHER_LDLIBS  += $(ZLIB_LIBS) -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
 endif
 endif #LINUX
 endif #PLATFORM
diff -Nru openjdk.orig/jdk/make/common/Program.gmk openjdk/jdk/make/common/Program.gmk
--- openjdk.orig/jdk/make/common/Program.gmk	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/make/common/Program.gmk	2013-12-18 17:01:35.350311481 +0000
@@ -83,7 +83,7 @@
 	endif
     endif
     ifeq ($(PLATFORM), linux)
-	LDFLAGS += -Wl,-z -Wl,origin
+	LDFLAGS += $(ZLIB_LIBS) -Wl,-z -Wl,origin
 	LDFLAGS += -Wl,--allow-shlib-undefined
 	LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
     endif
@@ -226,7 +226,6 @@
 endif
 
 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
-OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
 
 OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
 VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
diff -Nru openjdk.orig/jdk/make/java/jli/Makefile openjdk/jdk/make/java/jli/Makefile
--- openjdk.orig/jdk/make/java/jli/Makefile	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/make/java/jli/Makefile	2013-12-18 16:59:48.528719153 +0000
@@ -44,8 +44,6 @@
 
 include $(BUILDDIR)/common/Defs.gmk
 
-ZLIB_VERSION = 1.1.3
-ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
 LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
 LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
 
@@ -56,22 +54,14 @@
 	parse_manifest.c \
 	version_comp.c \
 	wildcard.c \
-	jli_util.c \
-	inflate.c \
-	infblock.c \
-	inftrees.c \
-	infcodes.c \
-	inffast.c \
-	infutil.c \
-	zadler32.c \
-	zutil.c
+	jli_util.c
 
 OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
 
 ifneq (,$(findstring $(PLATFORM), linux solaris))	# UNIX systems
 	LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
 	# Guarantee very limited dependencies
-	LDLIBS = -lc
+	LDLIBS = $(ZLIB_LIBS) -lc 
 endif
 
 ifeq ($(PLATFORM), windows)
@@ -98,7 +88,7 @@
 
 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
 OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC)
-OTHER_INCLUDES += -I$(ZIP_SRC)
+OTHER_INCLUDES += $(ZLIB_CFLAGS)
 
 #
 # Library to compile.
@@ -139,5 +128,5 @@
 #
 # Add to ambient vpath so we pick up the library files
 #
-vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC)
+vpath %.c $(LAUNCHER_SHARE_SRC)
 
diff -Nru openjdk.orig/jdk/make/java/zip/FILES_c.gmk openjdk/jdk/make/java/zip/FILES_c.gmk
--- openjdk.orig/jdk/make/java/zip/FILES_c.gmk	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/make/java/zip/FILES_c.gmk	2013-12-18 16:59:48.528719153 +0000
@@ -30,15 +30,4 @@
 	Inflater.c \
 	ZipFile.c \
 	ZipEntry.c \
-	zadler32.c \
-	zcrc32.c \
-	deflate.c \
-	trees.c \
-	zutil.c \
-	inflate.c \
-	infblock.c \
-	inftrees.c \
-	infcodes.c \
-	infutil.c \
-	inffast.c \
 	zip_util.c
diff -Nru openjdk.orig/jdk/make/java/zip/Makefile openjdk/jdk/make/java/zip/Makefile
--- openjdk.orig/jdk/make/java/zip/Makefile	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/make/java/zip/Makefile	2013-12-18 16:59:48.528719153 +0000
@@ -30,8 +30,6 @@
 PRODUCT = sun
 include $(BUILDDIR)/common/Defs.gmk
 
-ZLIB_VERSION = 1.1.3
-
 #
 # Files to compile.
 #
@@ -72,16 +70,10 @@
 CPPFLAGS += -UDEBUG 
 endif
 
-CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
 CPPFLAGS += -I$(SHARE_SRC)/native/java/io
 CPPFLAGS += -I$(PLATFORM_SRC)/native/java/io
 
 #
-# Add to ambient vpath so we pick up the library files
-#
-vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/zlib-$(ZLIB_VERSION)
-
-#
 # Link to JVM library for JVM_Zip* functions
 #
-OTHER_LDLIBS = $(JVMLIB)
+OTHER_LDLIBS = $(JVMLIB) $(ZLIB_LIBS)
diff -Nru openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h
--- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h	2013-12-18 16:59:48.528719153 +0000
@@ -89,11 +89,7 @@
 // bytes and byte arrays
 
 typedef unsigned int uint;
-#ifdef _LP64
-typedef unsigned int uLong; // Historical zlib, should be 32-bit.
-#else
 typedef unsigned long uLong;
-#endif
 #ifdef _MSC_VER 
 typedef LONGLONG 	jlong;
 typedef DWORDLONG 	julong;
diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/Adler32.c openjdk/jdk/src/share/native/java/util/zip/Adler32.c
--- openjdk.orig/jdk/src/share/native/java/util/zip/Adler32.c	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/src/share/native/java/util/zip/Adler32.c	2013-12-18 16:59:48.528719153 +0000
@@ -29,7 +29,7 @@
 
 #include "jni.h"
 #include "jni_util.h"
-#include "zlib.h"
+#include <zlib.h>
 
 #include "java_util_zip_Adler32.h"
 
diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/CRC32.c openjdk/jdk/src/share/native/java/util/zip/CRC32.c
--- openjdk.orig/jdk/src/share/native/java/util/zip/CRC32.c	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/src/share/native/java/util/zip/CRC32.c	2013-12-18 16:59:48.528719153 +0000
@@ -29,7 +29,7 @@
 
 #include "jni.h"
 #include "jni_util.h"
-#include "zlib.h"
+#include <zlib.h>
 
 #include "java_util_zip_CRC32.h"
 
diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/Deflater.c openjdk/jdk/src/share/native/java/util/zip/Deflater.c
--- openjdk.orig/jdk/src/share/native/java/util/zip/Deflater.c	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/src/share/native/java/util/zip/Deflater.c	2013-12-18 16:59:48.528719153 +0000
@@ -32,7 +32,7 @@
 #include "jlong.h"
 #include "jni.h"
 #include "jni_util.h"
-#include "zlib.h"
+#include <zlib.h>
 
 #include "java_util_zip_Deflater.h"
 
diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/Inflater.c openjdk/jdk/src/share/native/java/util/zip/Inflater.c
--- openjdk.orig/jdk/src/share/native/java/util/zip/Inflater.c	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/src/share/native/java/util/zip/Inflater.c	2013-12-18 16:59:48.528719153 +0000
@@ -35,7 +35,7 @@
 #include "jni.h"
 #include "jvm.h"
 #include "jni_util.h"
-#include "zlib.h"
+#include <zlib.h>
 #include "java_util_zip_Inflater.h"
 
 #define ThrowDataFormatException(env, msg) \
diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/zip_util.c openjdk/jdk/src/share/native/java/util/zip/zip_util.c
--- openjdk.orig/jdk/src/share/native/java/util/zip/zip_util.c	2013-12-06 00:20:25.000000000 +0000
+++ openjdk/jdk/src/share/native/java/util/zip/zip_util.c	2013-12-18 16:59:48.528719153 +0000
@@ -44,7 +44,8 @@
 #include "io_util.h"
 #include "io_util_md.h"
 #include "zip_util.h"
-#include "zlib.h"
+
+#include <zlib.h>
 
 /* USE_MMAP means mmap the CEN & ENDHDR part of the zip file. */
 #ifdef USE_MMAP
