Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 0828dfa

Browse files
committed
Export modules' DSO constructors.
We need to reference DSO constructors to make sure they can actually be linked to the final binary, see http://git.io/DRIqCg.
1 parent 16c9e8e commit 0828dfa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/node.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,14 @@ extern "C" NODE_EXTERN void node_module_register(void* mod);
402402
#if defined(_MSC_VER)
403403
#pragma section(".CRT$XCU", read)
404404
#define NODE_C_CTOR(fn) \
405-
static void __cdecl fn(void); \
405+
void __cdecl fn(void); \
406406
__declspec(dllexport, allocate(".CRT$XCU")) \
407407
void (__cdecl*fn ## _)(void) = fn; \
408-
static void __cdecl fn(void)
408+
void __cdecl fn(void)
409409
#else
410410
#define NODE_C_CTOR(fn) \
411-
static void fn(void) __attribute__((constructor)); \
412-
static void fn(void)
411+
void fn(void) __attribute__((constructor)); \
412+
void fn(void)
413413
#endif
414414

415415
#define NODE_MODULE_X(modname, regfunc, priv, flags) \

0 commit comments

Comments
 (0)