From 055c4340cc975cc7e6b1120ae9a9f54818ef8b5e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 9 Jan 2015 17:14:57 +0100 Subject: [PATCH] deps: fix zlib -Wimplicit-function-declaration Build the bundled zlib with -DZ_HAVE_UNISTD_H to make the definition of close(), read() and other unistd.h functions available to gzread.c and gzwrite.c. It's kind of silly that we have to jump through hoops here because we never call any of the functions that do I/O directly, but at least it squelches the -Wimplicit-function-declaration warnings. --- deps/zlib/zlib.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/zlib/zlib.gyp b/deps/zlib/zlib.gyp index fac801c7cbf362..fad1c94c1691ad 100644 --- a/deps/zlib/zlib.gyp +++ b/deps/zlib/zlib.gyp @@ -62,6 +62,7 @@ ['OS!="win"', { 'product_name': 'chrome_zlib', 'cflags!': [ '-ansi' ], + 'defines': [ 'Z_HAVE_UNISTD_H' ], 'sources!': [ 'contrib/minizip/iowin32.c' ],