]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
fix: windows build failure about defining nan
authorUse <fpnuseis@naver.com>
Thu, 15 Oct 2020 02:52:06 +0000 (11:52 +0900)
committerUse <fpnuseis@naver.com>
Thu, 15 Oct 2020 02:52:06 +0000 (11:52 +0900)
cJSON.c

diff --git a/cJSON.c b/cJSON.c
index 4c6a308eece9f19f46a66556b6a317a12f119fa5..6bc102bf5889e543cd679a6117a72ce4598613dc 100644 (file)
--- a/cJSON.c
+++ b/cJSON.c
 #endif
 
 #ifndef NAN
+#ifdef _WIN32
+#define NAN sqrt(-1.0)
+#else
 #define NAN 0.0/0.0
 #endif
+#endif
 
 typedef struct {
     const unsigned char *json;