From d46d5c8209bc8ef910a554913bb7066712ba353e Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Fri, 27 May 2016 19:08:20 +0200 Subject: [PATCH] Fix two OpenAL related compiler errors --- CMakeLists.txt | 1 + simgear/simgear_config_cmake.h.in | 2 ++ simgear/sound/soundmgr_openal.cxx | 2 +- simgear/sound/soundmgr_openal_private.hxx | 10 +++++++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76774923..90dfc810 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,6 +243,7 @@ check_include_file(sys/time.h HAVE_SYS_TIME_H) check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H) check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(windows.h HAVE_WINDOWS_H) +check_include_file(AL/alext.h HAVE_AL_EXT_H) if(HAVE_INTTYPES_H) # ShivaVG needs inttypes.h diff --git a/simgear/simgear_config_cmake.h.in b/simgear/simgear_config_cmake.h.in index 0cce4b31..c9804e7c 100644 --- a/simgear/simgear_config_cmake.h.in +++ b/simgear/simgear_config_cmake.h.in @@ -13,6 +13,8 @@ #cmakedefine HAVE_STD_ISNAN #cmakedefine HAVE_WINDOWS_H #cmakedefine HAVE_MKDTEMP +#cmakedefine HAVE_AL_EXT_H + #cmakedefine GCC_ATOMIC_BUILTINS_FOUND diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index 68147b0b..1dfbafa7 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -762,7 +762,7 @@ bool SGSoundMgr::load( const std::string &samplepath, if ( !is_working() ) return false; - ALenum format; + unsigned int format; ALsizei size; ALsizei freq; ALvoid *data; diff --git a/simgear/sound/soundmgr_openal_private.hxx b/simgear/sound/soundmgr_openal_private.hxx index 6bc3591f..d1b4f85a 100644 --- a/simgear/sound/soundmgr_openal_private.hxx +++ b/simgear/sound/soundmgr_openal_private.hxx @@ -29,6 +29,10 @@ #ifndef _SG_SOUNDMGR_OPENAL_PRIVATE_HXX #define _SG_SOUNDMGR_OPENAL_PRIVATE_HXX 1 +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include @@ -36,15 +40,15 @@ #if defined(__APPLE__) # include # include -# include #elif defined(OPENALSDK) # include # include -# include #else # include # include -# include +# ifdef HAVE_AL_EXT_H +# include +# endif #endif #include -- 2.39.5