Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit a3ec3c2

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 814d6a2 commit a3ec3c2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/node.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,14 @@ extern "C" NODE_EXTERN void node_module_register(void* mod);
337337
#if defined(_MSC_VER)
338338
#pragma section(".CRT$XCU", read)
339339
#define NODE_C_CTOR(fn) \
340-
static void __cdecl fn(void); \
340+
void __cdecl fn(void); \
341341
__declspec(dllexport, allocate(".CRT$XCU")) \
342342
void (__cdecl*fn ## _)(void) = fn; \
343-
static void __cdecl fn(void)
343+
void __cdecl fn(void)
344344
#else
345345
#define NODE_C_CTOR(fn) \
346-
static void fn(void) __attribute__((constructor)); \
347-
static void fn(void)
346+
void fn(void) __attribute__((constructor)); \
347+
void fn(void)
348348
#endif
349349

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

0 commit comments

Comments
 (0)