diff -ur libprojectM-1.01.orig/SOIL.c libprojectM-1.01/SOIL.c --- libprojectM-1.01.orig/SOIL.c 2007-10-10 17:47:14.000000000 +0300 +++ libprojectM-1.01/SOIL.c 2007-11-02 16:03:53.000000000 +0200 @@ -1389,12 +1389,10 @@ } else { /* and find the address of the extension function */ - void *ext_addr = NULL; + P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC ext_addr = NULL; #ifdef WIN32 - ext_addr = (void*)wglGetProcAddress - ( - "glCompressedTexImage2DARB" - ); + ext_addr = (P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC) + wglGetProcAddress("glCompressedTexImage2DARB"); #elif defined(__APPLE__) || defined(__APPLE_CC__) /* I can't test this Apple stuff! */ CFBundleRef bundle; @@ -1411,16 +1409,14 @@ kCFStringEncodingASCII ); bundle = CFBundleCreate( kCFAllocatorDefault, bundleURL ); assert( bundle != NULL ); - ext_addr = CFBundleGetFunctionPointerForName( - bundle, extensionName ); + ext_addr = (P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC) + CFBundleGetFunctionPointerForName( bundle, extensionName ); CFRelease( bundleURL ); CFRelease( functionName ); CFRelease( bundle ); #else - ext_addr = (void*)glXGetProcAddressARB - ( - (const GLubyte *)"glCompressedTexImage2DARB" - ); + ext_addr = (P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC) + glXGetProcAddress((const GLubyte *)"glCompressedTexImage2DARB"); #endif /* Flag it so no checks needed later */ if( NULL == ext_addr ) @@ -1435,7 +1431,7 @@ } else { /* all's well! */ - soilGlCompressedTexImage2D = (P_SOIL_GLCOMPRESSEDTEXIMAGE2DPROC)ext_addr; + soilGlCompressedTexImage2D = ext_addr; has_DXT_capability = SOIL_DXT_DIRECT_UPLOAD; } }