X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fdso%2Fdso_dlfcn.c;h=1fd10104c521ccbf29a798091faa078f0e1c81aa;hb=beae6324e5ef9b62500f9ddf6eb34541f4027dd9;hp=259aee83e7581d78e20ef6f9c8492d2a589370c4;hpb=e666c4599f017c244873a0184807ee22058a70b3;p=oweals%2Fopenssl.git diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index 259aee83e7..1fd10104c5 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -128,7 +128,11 @@ DSO_METHOD *DSO_METHOD_dlfcn(void) # endif # endif #else -# define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */ +# ifdef OPENSSL_SYS_SUNOS +# define DLOPEN_FLAG 1 +# else +# define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */ +# endif #endif /* For this DSO_METHOD, our meth_data STACK will contain; @@ -233,7 +237,7 @@ static void *dlfcn_bind_var(DSO *dso, const char *symname) static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname) { void *ptr; - DSO_FUNC_TYPE sym; + DSO_FUNC_TYPE sym, *tsym = &sym; if((dso == NULL) || (symname == NULL)) { @@ -251,7 +255,7 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname) DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_NULL_HANDLE); return(NULL); } - sym = (DSO_FUNC_TYPE)dlsym(ptr, symname); + *(void **)(tsym) = dlsym(ptr, symname); if(sym == NULL) { DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE);