Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: export public symbols in addons tests #28717

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/addons/dlopen-ping-pong/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

#include <dlfcn.h>

extern "C" const char* dlopen_pong(void) {
extern "C"
__attribute__((visibility("default")))
bnoordhuis marked this conversation as resolved.
Show resolved Hide resolved
const char* dlopen_pong(void) {
return "pong";
}

Expand Down
1 change: 1 addition & 0 deletions test/addons/dlopen-ping-pong/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const char* dlopen_pong(void);

__attribute__((visibility("default")))
const char* dlopen_ping(void) {
return dlopen_pong();
}
Expand Down
10 changes: 8 additions & 2 deletions test/addons/openssl-client-cert-engine/testengine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
#define AGENT_KEY "test/fixtures/keys/agent1-key.pem"
#define AGENT_CERT "test/fixtures/keys/agent1-cert.pem"

#ifdef _WIN32
bnoordhuis marked this conversation as resolved.
Show resolved Hide resolved
# define DEFAULT_VISIBILITY __declspec(dllexport)
#else
# define DEFAULT_VISIBILITY __attribute__((visibility("default")))
#endif

namespace {

int EngineInit(ENGINE* engine) {
Expand Down Expand Up @@ -93,8 +99,8 @@ int bind_fn(ENGINE* engine, const char* id) {
}

extern "C" {
IMPLEMENT_DYNAMIC_CHECK_FN();
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn);
DEFAULT_VISIBILITY IMPLEMENT_DYNAMIC_CHECK_FN();
DEFAULT_VISIBILITY IMPLEMENT_DYNAMIC_BIND_FN(bind_fn);
}

} // anonymous namespace
10 changes: 8 additions & 2 deletions test/addons/openssl-key-engine/testkeyengine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@

#define PRIVATE_KEY "test/fixtures/keys/agent1-key.pem"

#ifdef _WIN32
# define DEFAULT_VISIBILITY __declspec(dllexport)
#else
# define DEFAULT_VISIBILITY __attribute__((visibility("default")))
#endif

namespace {

int EngineInit(ENGINE* engine) {
Expand Down Expand Up @@ -66,8 +72,8 @@ int bind_fn(ENGINE* engine, const char* id) {
}

extern "C" {
IMPLEMENT_DYNAMIC_CHECK_FN();
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn);
DEFAULT_VISIBILITY IMPLEMENT_DYNAMIC_CHECK_FN();
DEFAULT_VISIBILITY IMPLEMENT_DYNAMIC_BIND_FN(bind_fn);
}

} // anonymous namespace