From 3eb67d8038e5ceb01a0520148e6ebb62786ac564 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 24 Oct 2018 10:38:25 -0700 Subject: [PATCH 1/4] Remove use of OPENSSL_NO_THREADS with BoringSSL --- packages/grpc-native-core/binding.gyp | 8 ++------ packages/grpc-native-core/templates/binding.gyp.template | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 6c0a986d..3e858e18 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -91,7 +91,8 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=0', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.16.0-pre1"' + 'GRPC_NODE_VERSION="1.16.0-pre1"', + '_XOPEN_SOURCE=500' ], 'conditions': [ ['grpc_gcov=="true"', { @@ -118,11 +119,6 @@ 'GPR_MUSL_LIBC_COMPAT' ] }], - ['OS!="win" and runtime=="electron"', { - "defines": [ - 'OPENSSL_NO_THREADS' - ] - }], # This is the condition for using boringssl ['OS=="win" or runtime=="electron"', { "include_dirs": [ diff --git a/packages/grpc-native-core/templates/binding.gyp.template b/packages/grpc-native-core/templates/binding.gyp.template index f9abaa7c..a9ba8507 100644 --- a/packages/grpc-native-core/templates/binding.gyp.template +++ b/packages/grpc-native-core/templates/binding.gyp.template @@ -83,7 +83,8 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=0', 'GRPC_UV', - 'GRPC_NODE_VERSION="${settings.get('node_version', settings.version)}"' + 'GRPC_NODE_VERSION="${settings.get('node_version', settings.version)}"', + '_XOPEN_SOURCE=500' ], 'conditions': [ ['grpc_gcov=="true"', { @@ -102,11 +103,6 @@ 'GPR_MUSL_LIBC_COMPAT' ] }], - ['OS!="win" and runtime=="electron"', { - "defines": [ - 'OPENSSL_NO_THREADS' - ] - }], # This is the condition for using boringssl ['OS=="win" or runtime=="electron"', { "include_dirs": [ From b7f7bf0dce62a901326bb01022f122de6ccdab2c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 24 Oct 2018 11:00:25 -0700 Subject: [PATCH 2/4] Increase _XOPEN_SOURCE macro to 700 --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/templates/binding.gyp.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 3e858e18..60b79626 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -92,7 +92,7 @@ 'GRPC_ARES=0', 'GRPC_UV', 'GRPC_NODE_VERSION="1.16.0-pre1"', - '_XOPEN_SOURCE=500' + '_XOPEN_SOURCE=700' ], 'conditions': [ ['grpc_gcov=="true"', { diff --git a/packages/grpc-native-core/templates/binding.gyp.template b/packages/grpc-native-core/templates/binding.gyp.template index a9ba8507..56dc446e 100644 --- a/packages/grpc-native-core/templates/binding.gyp.template +++ b/packages/grpc-native-core/templates/binding.gyp.template @@ -84,7 +84,7 @@ 'GRPC_ARES=0', 'GRPC_UV', 'GRPC_NODE_VERSION="${settings.get('node_version', settings.version)}"', - '_XOPEN_SOURCE=500' + '_XOPEN_SOURCE=700' ], 'conditions': [ ['grpc_gcov=="true"', { From 31a0019d99d6984585876a8e26b4f8ab0a87a43e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 24 Oct 2018 12:35:45 -0700 Subject: [PATCH 3/4] Set _XOPEN_SOURCE only for BoringSSL --- packages/grpc-native-core/binding.gyp | 6 ++++-- packages/grpc-native-core/templates/binding.gyp.template | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 60b79626..2d4dd4d0 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -91,8 +91,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=0', 'GRPC_UV', - 'GRPC_NODE_VERSION="1.16.0-pre1"', - '_XOPEN_SOURCE=700' + 'GRPC_NODE_VERSION="1.16.0-pre1"' ], 'conditions': [ ['grpc_gcov=="true"', { @@ -224,6 +223,9 @@ 'cflags': [ '-Wno-implicit-fallthrough' ], + 'defines': [ + '_XOPEN_SOURCE=700' + ] 'dependencies': [ ], 'sources': [ diff --git a/packages/grpc-native-core/templates/binding.gyp.template b/packages/grpc-native-core/templates/binding.gyp.template index 56dc446e..0a526025 100644 --- a/packages/grpc-native-core/templates/binding.gyp.template +++ b/packages/grpc-native-core/templates/binding.gyp.template @@ -83,8 +83,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE', 'GRPC_ARES=0', 'GRPC_UV', - 'GRPC_NODE_VERSION="${settings.get('node_version', settings.version)}"', - '_XOPEN_SOURCE=700' + 'GRPC_NODE_VERSION="${settings.get('node_version', settings.version)}"' ], 'conditions': [ ['grpc_gcov=="true"', { @@ -196,6 +195,9 @@ 'cflags': [ '-Wno-implicit-fallthrough' ], + 'defines': [ + '_XOPEN_SOURCE=700' + ] 'dependencies': [ % for dep in getattr(lib, 'deps', []): '${dep}', From 9b5ed6240b364484c4e53b3cf016b2e290171e6e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 24 Oct 2018 13:40:26 -0700 Subject: [PATCH 4/4] Add missing comma in binding.gyp --- packages/grpc-native-core/binding.gyp | 2 +- packages/grpc-native-core/templates/binding.gyp.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-native-core/binding.gyp b/packages/grpc-native-core/binding.gyp index 2d4dd4d0..b11c7611 100644 --- a/packages/grpc-native-core/binding.gyp +++ b/packages/grpc-native-core/binding.gyp @@ -225,7 +225,7 @@ ], 'defines': [ '_XOPEN_SOURCE=700' - ] + ], 'dependencies': [ ], 'sources': [ diff --git a/packages/grpc-native-core/templates/binding.gyp.template b/packages/grpc-native-core/templates/binding.gyp.template index 0a526025..8addf14a 100644 --- a/packages/grpc-native-core/templates/binding.gyp.template +++ b/packages/grpc-native-core/templates/binding.gyp.template @@ -197,7 +197,7 @@ ], 'defines': [ '_XOPEN_SOURCE=700' - ] + ], 'dependencies': [ % for dep in getattr(lib, 'deps', []): '${dep}',