diff --git kdchart/kdablibfakes/src/KDABLibFakes.h kdchart/kdablibfakes/src/KDABLibFakes.h
index ab10c46..5f17791 100644
--- kdchart/kdablibfakes/src/KDABLibFakes.h
+++ kdchart/kdablibfakes/src/KDABLibFakes.h
@@ -29,12 +29,12 @@
  ** your option) use any later version of the GNU General Public
  ** License if such license has been publicly approved by
  ** Klarälvdalens Datakonsult AB (or its successors, if any).
- ** 
+ **
  ** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
  ** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
  ** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
  ** not expressly granted herein.
- ** 
+ **
  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  **
@@ -46,6 +46,7 @@
 #if defined Q_OS_DARWIN
 /* On Mac OS X, ensure that <cmath> will define std::isnan */
 #define _GLIBCPP_USE_C99 1
+#include <math.h>
 #endif
 
 #include <cmath>
@@ -73,8 +74,8 @@
 #define ISNAN(x ) _isnan(x )
 #define ISINF(x ) (!(_finite(x ) + _isnan(x ) ) )
 #elif defined (Q_OS_DARWIN) || defined (Q_OS_CYGWIN)
-#define ISNAN(x) std::isnan(x)
-#define ISINF(x) std::isinf(x)
+#define ISNAN(x) isnan(double(x))
+#define ISINF(x) isinf(double(x))
 #else
 #define ISNAN(x) isnan(x)
 #define ISINF(x) isinf(x)
