From 2e80b912ef93f39096699d68570dae6d5c2f06e9 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Mon, 15 Oct 2018 15:15:58 -0700 Subject: [PATCH] src: use `visibility("default")` exports on POSIX Electron uses this because Chromium builds with symbols hidden by default. Refs:https://github.com/electron/node/commit/ 88b494191c2a5b50b01dab80cd61ba3c0e0fbeb9 Refs: https://github.com/electron/node/commit/ 1293d1d7d0c33d3925da11ceccdce4eb2e927a43 PR-URL: https://github.com/nodejs/node/pull/25893 Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan --- src/js_native_api.h | 2 +- src/node.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js_native_api.h b/src/js_native_api.h index acb7316d2d2972..9d0fa811cfa3af 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -22,7 +22,7 @@ #ifdef _WIN32 #define NAPI_EXTERN __declspec(dllexport) #else - #define NAPI_EXTERN /* nothing */ + #define NAPI_EXTERN __attribute__((visibility("default"))) #endif #endif diff --git a/src/node.h b/src/node.h index 72911d7982b72f..c260d172c01ebf 100644 --- a/src/node.h +++ b/src/node.h @@ -29,7 +29,7 @@ # define NODE_EXTERN __declspec(dllimport) # endif #else -# define NODE_EXTERN /* nothing */ +# define NODE_EXTERN __attribute__((visibility("default"))) #endif #ifdef BUILDING_NODE_EXTENSION