diff --git a/simgear/scene/sky/cloud.cxx b/simgear/scene/sky/cloud.cxx index d4557064..dbc7d03d 100644 --- a/simgear/scene/sky/cloud.cxx +++ b/simgear/scene/sky/cloud.cxx @@ -46,11 +46,14 @@ inline int (isnan)(double r) { return isnan(r); } #endif #if defined (__FreeBSD__) -inline int isnan(double r) { return !(r <= 0 || r >= 0); } +# if __FreeBSD_version < 500000 + extern "C" { + inline int isnan(double r) { return !(r <= 0 || r >= 0); } + } +# endif #endif - static ssgStateSelector *layer_states[SGCloudLayer::SG_MAX_CLOUD_COVERAGES]; static bool state_initialized = false; static bool bump_mapping = false; diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index e9e2dfbc..9ec8355d 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -46,6 +46,15 @@ inline int (isnan)(double r) { return isnan(r); } #define isnan(x) _isnan(x) #endif +#if defined (__FreeBSD__) +# if __FreeBSD_version < 500000 + extern "C" { + inline int isnan(double r) { return !(r <= 0 || r >= 0); } + } +# endif +#endif + + #if defined (__FreeBSD__) inline int isnan(double r) { return !(r <= 0 || r >= 0); } #endif