diff --git a/src/native/common/extal.c b/src/native/common/extal.c index 0c310458..f44159bc 100644 --- a/src/native/common/extal.c +++ b/src/native/common/extal.c @@ -33,6 +33,10 @@ #include #include "extal.h" +#ifndef _WIN32 +#include +#endif + /** * $Id$ * @@ -150,7 +154,7 @@ void* GetFunctionPointer(const char* function) { #ifdef _WIN32 return GetProcAddress(handleOAL, function); #else - return NULL; + return dlsym(handleOAL, function); #endif } @@ -161,7 +165,7 @@ void LoadOpenAL() { #ifdef _WIN32 handleOAL = LoadLibrary("OpenAL32.dll"); #else - handleOAL = NULL; + handleOAL = dlopen("libopenal.so", RTLD_LAZY); #endif } diff --git a/src/native/common/extal.h b/src/native/common/extal.h index 5001d925..4a267f85 100644 --- a/src/native/common/extal.h +++ b/src/native/common/extal.h @@ -107,7 +107,7 @@ int InitializeOpenAL(); void DeInitializeOpenAL(); //alc -typedef ALCubyte* (/*ALCAPIENTRY*/ *alcGetStringPROC)(ALCdevice *device,ALCenum param); +typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param); typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data); typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName); typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device);