From 85ef9930f56bf15181f9a0b238f03d55303cf411 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 22 Nov 2010 19:42:40 +0000 Subject: Updated to mesalib 7.9 --- mesalib/src/mesa/main/dlopen.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mesalib/src/mesa/main/dlopen.c') diff --git a/mesalib/src/mesa/main/dlopen.c b/mesalib/src/mesa/main/dlopen.c index 658ac9e40..57a33292e 100644 --- a/mesalib/src/mesa/main/dlopen.c +++ b/mesalib/src/mesa/main/dlopen.c @@ -67,22 +67,27 @@ _mesa_dlopen(const char *libname, int flags) GenericFunc _mesa_dlsym(void *handle, const char *fname) { + union { + void *v; + GenericFunc f; + } u; #if defined(__blrts) - return (GenericFunc) NULL; + u.v = NULL; #elif defined(__DJGPP__) /* need '_' prefix on symbol names */ char fname2[1000]; fname2[0] = '_'; strncpy(fname2 + 1, fname, 998); fname2[999] = 0; - return (GenericFunc) dlsym(handle, fname2); + u.v = dlsym(handle, fname2); #elif defined(_GNU_SOURCE) - return (GenericFunc) dlsym(handle, fname); + u.v = dlsym(handle, fname); #elif defined(__MINGW32__) - return (GenericFunc) GetProcAddress(handle, fname); + u.v = (void *) GetProcAddress(handle, fname); #else - return (GenericFunc) NULL; + u.v = NULL; #endif + return u.f; } -- cgit v1.2.3