diff options
Diffstat (limited to 'xpcom/ds/nsMathUtils.h')
-rw-r--r-- | xpcom/ds/nsMathUtils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h index 57228d6634..a3058faaaf 100644 --- a/xpcom/ds/nsMathUtils.h +++ b/xpcom/ds/nsMathUtils.h @@ -103,6 +103,10 @@ NS_finite(double aNum) #ifdef WIN32 // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800. return !!_finite(aNum); +#elif defined(XP_DARWIN) + // Darwin has deprecated |finite| and recommends |isfinite|. The former is + // not present in the iOS SDK. + return std::isfinite(aNum); #else return finite(aNum); #endif |