Skip to content

Commit

Permalink
fix: windows build failure about defining nan
Browse files Browse the repository at this point in the history
  • Loading branch information
fpnuseis committed Oct 15, 2020
1 parent d273527 commit 9931900
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cJSON.c
Expand Up @@ -78,8 +78,12 @@
#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;
Expand Down

0 comments on commit 9931900

Please sign in to comment.