aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libjson-c/patches/000-libm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/libs/libjson-c/patches/000-libm.patch')
-rw-r--r--package/libs/libjson-c/patches/000-libm.patch9
1 files changed, 8 insertions, 1 deletions
diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch
index 35ffec8724..c6ff5f4766 100644
--- a/package/libs/libjson-c/patches/000-libm.patch
+++ b/package/libs/libjson-c/patches/000-libm.patch
@@ -1,6 +1,6 @@
--- a/math_compat.h
+++ b/math_compat.h
-@@ -6,31 +6,9 @@
+@@ -6,38 +6,9 @@
* @brief Do not use, json-c internal, may be changed or removed at any time.
*/
@@ -10,6 +10,9 @@
-#ifdef HAVE_DECL__ISNAN
-#include <float.h>
-#define isnan(x) _isnan(x)
+-#else
+-/* On platforms like AIX and "IBM i" we need to provide our own isnan */
+-#define isnan(x) ((x) != (x))
-#endif
-#endif
-
@@ -17,6 +20,10 @@
-#ifdef HAVE_DECL__FINITE
-#include <float.h>
-#define isinf(x) (!_finite(x))
+-#else
+-#include <float.h>
+-/* On platforms like AIX and "IBM i" we need to provide our own isinf */
+-#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX)
-#endif
-#endif
-