summaryrefslogtreecommitdiff
path: root/package/firefox/patches/patch-xpcom_ds_nsMathUtils_h
blob: a22b709eb7200db1626a5cedfea6cd9eb00a3fd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- mozilla-release.orig/xpcom/ds/nsMathUtils.h	2015-10-14 23:41:52.000000000 +0200
+++ mozilla-release/xpcom/ds/nsMathUtils.h	2015-10-22 21:35:50.563890005 +0200
@@ -105,12 +105,16 @@ NS_finite(double aNum)
 #ifdef WIN32
   // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
   return !!_finite(aNum);
-#elif defined(XP_DARWIN)
+#elif defined(XP_DARWIN) || defined(__UCLIBC__)
   // Darwin has deprecated |finite| and recommends |isfinite|. The former is
   // not present in the iOS SDK.
   return std::isfinite(aNum);
 #else
-  return finite(aNum);
+#ifdef _GLIBCXX_CMATH
+  return std::isfinite(aNum);
+#else
+  return isfinite(aNum);
+#endif
 #endif
 }