summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glib/tests/option-context.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c
index e68bbe74e..8a5d2091d 100644
--- a/glib/tests/option-context.c
+++ b/glib/tests/option-context.c
@@ -28,8 +28,10 @@
#include <locale.h>
#include <math.h>
-#ifndef NAN
-#define NAN HUGE_VAL * 0.0f
+#ifdef _MSC_VER
+# ifndef NAN
+# define NAN HUGE_VAL * 0.0f
+# endif
#endif
static GOptionEntry main_entries[] = {