diff --git a/build/bakefiles/zlib.bkl b/build/bakefiles/zlib.bkl
index 4a1ce03797..3379f22a3e 100644
--- a/build/bakefiles/zlib.bkl
+++ b/build/bakefiles/zlib.bkl
@@ -18,6 +18,9 @@
cond="wxUSE_ZLIB=='builtin' and BUILDING_LIB=='1'">
$(LIBDIRNAME)
-w-8004 -w-8012 -w-8057
+
+ NO_ERRNO_H
+
src/zlib/adler32.c
src/zlib/compress.c