mturk / rpms / openssl

Forked from rpms/openssl 3 years ago
Clone
a99897e
a99897e
This patch fixes a violation of the C aliasing rules that can cause
a99897e
miscompilation with some compiler versions.
a99897e
a99897e
--- openssl-0.9.8b/crypto/dso/dso_dlfcn.c.orig	2006-10-30 18:21:35.000000000 +0100
a99897e
+++ openssl-0.9.8b/crypto/dso/dso_dlfcn.c	2006-10-30 18:21:37.000000000 +0100
a99897e
@@ -237,7 +237,7 @@ static void *dlfcn_bind_var(DSO *dso, co
a99897e
 static DSO_FUNC_TYPE dlfcn_bind_func(DSO *dso, const char *symname)
a99897e
 	{
a99897e
 	void *ptr;
a99897e
-	DSO_FUNC_TYPE sym, *tsym = &sy;;
a99897e
+	DSO_FUNC_TYPE sym;
a99897e
 
a99897e
 	if((dso == NULL) || (symname == NULL))
a99897e
 		{
a99897e
@@ -255,7 +255,7 @@ static DSO_FUNC_TYPE dlfcn_bind_func(DSO
a99897e
 		DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_NULL_HANDLE);
a99897e
 		return(NULL);
a99897e
 		}
a99897e
-	*(void **)(tsym) = dlsym(ptr, symname);
a99897e
+	sym = dlsym(ptr, symname);
a99897e
 	if(sym == NULL)
a99897e
 		{
a99897e
 		DSOerr(DSO_F_DLFCN_BIND_FUNC,DSO_R_SYM_FAILURE);