deps: fix zlib -Wimplicit-function-declaration
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 9 Jan 2015 16:14:57 +0000 (17:14 +0100)
committerBert Belder <bertbelder@gmail.com>
Sat, 10 Jan 2015 01:38:17 +0000 (02:38 +0100)
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.

PR-URL: https://github.com/iojs/io.js/pull/273
Reviewed-by: Bert Belder <bertbelder@gmail.com>
deps/zlib/zlib.gyp

index fac801c..fad1c94 100644 (file)
@@ -62,6 +62,7 @@
             ['OS!="win"', {
               'product_name': 'chrome_zlib',
               'cflags!': [ '-ansi' ],
+              'defines': [ 'Z_HAVE_UNISTD_H' ],
               'sources!': [
                 'contrib/minizip/iowin32.c'
               ],