From f8999da51433b70015b1732682dc7f039b486fbd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 3 Dec 2012 02:19:15 +0100 Subject: [PATCH] build: avoid -Wno-old-style-declaration with gcc 4.2 Fixes the build on FreeBSD <= 9 with the default compiler. Fixes #4186. --- deps/openssl/openssl.gyp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index 3f4a7fa3281..297d3de9111 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -3,6 +3,11 @@ # found in the LICENSE file. { + 'variables': { + 'is_clang': 0, + 'gcc_version': 0, + }, + 'targets': [ { 'target_name': 'openssl', @@ -674,10 +679,10 @@ 'OPENSSLDIR="/etc/ssl"', 'TERMIOS', ], - 'cflags': [ - '-Wno-missing-field-initializers', - '-Wno-old-style-declaration', - ], + 'cflags': ['-Wno-missing-field-initializers'], + }], + ['is_clang==1 or gcc_version>=43', { + 'cflags': ['-Wno-old-style-declaration'], }], ['OS=="solaris"', { 'defines': ['__EXTENSIONS__'],