From aa6240ac93eae6b9a6c9c51ae5a0bc705f89d53d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 19 Aug 2016 16:22:30 -0700 Subject: [PATCH] Try to fix node interop issues --- binding.gyp | 9 ++++++++- templates/binding.gyp.template | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index 6c6b3cfc799..51548682063 100644 --- a/binding.gyp +++ b/binding.gyp @@ -771,9 +771,10 @@ }, { 'cflags': [ + '-std=c99', '-Wall', '-Werror', - '-Wno-implicit-function-declaration' + '-Wno-invalid-source-encoding', ], 'include_dirs': [ 'src/c-ares' ], 'target_name': 'ares', @@ -833,6 +834,12 @@ 'third_party/c-ares/windows_port.c', ], "conditions": [ + ['OS != "win"', { + 'defines': [ + 'HAVE_CONFIG_H', + '_GNU_SOURCE' + ] + }], ['OS == "mac"', { 'xcode_settings': { 'MACOSX_DEPLOYMENT_TARGET': '10.9' diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index c5549e5cad2..2da9785201a 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -209,9 +209,10 @@ % if lib.name == 'ares': { 'cflags': [ + '-std=c99', '-Wall', '-Werror', - '-Wno-implicit-function-declaration' + '-Wno-invalid-source-encoding', ], 'include_dirs': [ 'src/c-ares' ], 'target_name': '${lib.name}', @@ -225,6 +226,12 @@ % endfor ], "conditions": [ + ['OS != "win"', { + 'defines': [ + 'HAVE_CONFIG_H', + '_GNU_SOURCE' + ] + }], ['OS == "mac"', { 'xcode_settings': { 'MACOSX_DEPLOYMENT_TARGET': '10.9'