diff --git a/glib/gdatetime.c b/glib/gdatetime.c index 1d17d862f..ffdeddd81 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -80,6 +80,11 @@ #ifndef G_OS_WIN32 #include #include +#else +#if defined (_MSC_VER) && (_MSC_VER < 1800) +/* fallback implementation for isnan() on VS2012 and earlier */ +#define isnan _isnan +#endif #endif /* !G_OS_WIN32 */ /** diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c index 60f9eb274..bc4eba93a 100644 --- a/glib/tests/gdatetime.c +++ b/glib/tests/gdatetime.c @@ -29,6 +29,10 @@ #ifdef G_OS_WIN32 #define WIN32_LEAN_AND_MEAN #include + +#ifndef NAN +#define NAN HUGE_VAL * 0.0f +#endif #endif #define ASSERT_DATE(dt,y,m,d) G_STMT_START { \