#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;
#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