From 8680bb9f1a0163cfbdc4443c1eb2b56c5e443616 Mon Sep 17 00:00:00 2001 From: Yihong Wang Date: Sat, 21 Oct 2017 23:16:50 -0700 Subject: src: explicitly register built-in modules Previously, built-in modules are registered before main() via __attribute__((constructor)) mechanism in GCC and similiar mechanism in MSVC. This causes some issues when node is built as static library. Calling module registration function for built-in modules in node::Init() helps to avoid the issues. Signed-off-by: Yihong Wang PR-URL: https://github.com/nodejs/node/pull/16565 Refs: https://github.com/nodejs/node/pull/14986#issuecomment-332758206 Reviewed-By: Gireesh Punathil Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- src/spawn_sync.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/spawn_sync.cc') diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc index 626ecbb04ff..4e51cc5d8f1 100644 --- a/src/spawn_sync.cc +++ b/src/spawn_sync.cc @@ -1081,5 +1081,5 @@ void SyncProcessRunner::KillTimerCloseCallback(uv_handle_t* handle) { } // namespace node -NODE_MODULE_CONTEXT_AWARE_BUILTIN(spawn_sync, +NODE_BUILTIN_MODULE_CONTEXT_AWARE(spawn_sync, node::SyncProcessRunner::Initialize) -- cgit v1.2.3