From 9dd50249b597109c5956a531e44d46dc344daea5 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Wed, 7 Jun 2017 14:37:27 +0200 Subject: common: always use p11_dl_close wrapper Solaris doesn't like it when dlclose is referenced using a define, resulting in a linker error looking for a symbol version. Simply calling the function in a normal way (instead of storing its address) solves this linking error. The error message seen by GNU ld is: dlclose: invalid version 7 (max 0) --- common/compat.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'common/compat.h') diff --git a/common/compat.h b/common/compat.h index 15b3106..b021494 100644 --- a/common/compat.h +++ b/common/compat.h @@ -91,6 +91,8 @@ char * mkdtemp (char *template); char * strdup_path_mangle (const char *template); +void p11_dl_close (void * dl); + /* ----------------------------------------------------------------------------- * WIN32 */ @@ -147,8 +149,6 @@ typedef HMODULE dl_module_t; char * p11_dl_error (void); -void p11_dl_close (void * dl); - #define p11_sleep_ms(ms) \ (Sleep (ms)) @@ -206,8 +206,6 @@ typedef void * dl_module_t; #define p11_dl_open(f) \ (dlopen ((f), RTLD_LOCAL | RTLD_NOW)) -#define p11_dl_close \ - dlclose #define p11_dl_symbol(d, s) \ (dlsym ((d), (s))) -- cgit v1.1