Browse Source

Merge pull request #344 from fastogt/master

Fix Mingw build
tags/json-c-0.13-20171207
Eric Haszlakiewicz GitHub 8 years ago
parent
commit
2f1fe55f66
2 changed files with 4 additions and 1 deletions
  1. +1
    -0
      CMakeLists.txt
  2. +3
    -1
      json_util.c

+ 1
- 0
CMakeLists.txt View File

@@ -67,6 +67,7 @@ set(JSON_C_SOURCES
./linkhash.c
./printbuf.c
./random_seed.c
./strerror_override.c
)

add_library(json-c


+ 3
- 1
json_util.c View File

@@ -195,7 +195,9 @@ int json_object_to_file(const char *filename, struct json_object *obj)

int json_parse_double(const char *buf, double *retval)
{
return (sscanf(buf, "%lf", retval)==1 ? 0 : 1);
char *end;
*retval = strtod(buf, &end);
return end == buf ? 1 : 0;
}

/*


Loading…
Cancel
Save