build: avoid -Wno-old-style-declaration with gcc 4.2
authorBen Noordhuis <info@bnoordhuis.nl>
Mon, 3 Dec 2012 01:19:15 +0000 (02:19 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 3 Dec 2012 01:21:32 +0000 (02:21 +0100)
Fixes the build on FreeBSD <= 9 with the default compiler.

Fixes #4186.

deps/openssl/openssl.gyp

index 3f4a7fa..297d3de 100644 (file)
@@ -3,6 +3,11 @@
 # found in the LICENSE file.
 
 {
+  'variables': {
+    'is_clang': 0,
+    'gcc_version': 0,
+  },
+
   'targets': [
     {
       'target_name': 'openssl',
             '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__'],