diff --git a/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.c b/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.c index 675caace9..c1861fb64 100644 --- a/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.c +++ b/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.c @@ -23,6 +23,8 @@ #include "audiodrv_openal.h" #include "libs/tasklib.h" +#include + ALCcontext *alcContext = NULL; ALCdevice *alcDevice = NULL; diff --git a/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.h b/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.h index 4e0aa9e21..a781a0869 100644 --- a/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.h +++ b/sc2/src/sc2code/libs/sound/openal/audiodrv_openal.h @@ -33,8 +33,18 @@ #else # include # include -# define AL_INVALID_ENUM AL_ILLEGAL_ENUM -# define AL_INVALID_OPERATION AL_ILLEGAL_COMMAND + /* XXX: In new versions of OpenAL the defines AL_INVALID_ENUM and + * AL_INVALID_OPERATION are already defined. + * As you can only get OpenAL from CVS (or a 3rd party package), + * we can probably remove these defines altogether in the near + * future. + */ +# ifndef AL_INVALID_ENUM +# define AL_INVALID_ENUM AL_ILLEGAL_ENUM +# endif +# ifndef AL_INVALID_OPERATION +# define AL_INVALID_OPERATION AL_ILLEGAL_COMMAND +# endif # define AL_DATA 0x2005 #endif