diff --git a/simgear/scene/sky/cloud.cxx b/simgear/scene/sky/cloud.cxx index a2b3b662..e62384b9 100644 --- a/simgear/scene/sky/cloud.cxx +++ b/simgear/scene/sky/cloud.cxx @@ -21,7 +21,7 @@ // #include #include -#if defined (__APPLE__) || defined (__FreeBSD__) +#if defined (__APPLE__) // any C++ header file undefines isinf and isnan // so this should be included before inline int (isinf)(double r) { return isinf(r); } @@ -45,6 +45,11 @@ inline int (isnan)(double r) { return isnan(r); } #define isnan(x) _isnan(x) #endif +#if defined (__FreeBSD__) +inline int isnan(double r) { return !(r < 0 || r > 0); } +#endif + + static ssgStateSelector *layer_states[SGCloudLayer::SG_MAX_CLOUD_COVERAGES]; static bool state_initialized = false; diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index 1966259a..0785edb5 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -35,7 +35,7 @@ # include #endif -#if defined (__APPLE__) +#if defined (__APPLE__) // any C++ header file undefines isinf and isnan // so this should be included before inline int (isinf)(double r) { return isinf(r); } @@ -46,6 +46,10 @@ inline int (isnan)(double r) { return isnan(r); } #define isnan(x) _isnan(x) #endif +#if defined (__FreeBSD__) +inline int isnan(double r) { return !(r < 0 || r > 0); } +#endif + #include STL_IOSTREAM #include