fixed build of bundled libjansson
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 9 Oct 2017 12:01:38 +0000 (15:01 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 9 Oct 2017 12:01:38 +0000 (15:01 +0300)
src/jansson/strbuffer.c
src/jansson/value.c

index 2d6ff31..e37e5ec 100644 (file)
@@ -83,7 +83,7 @@ int strbuffer_append_bytes(strbuffer_t *strbuff, const char *data, size_t size)
             || strbuff->length > STRBUFFER_SIZE_MAX - 1 - size)
             return -1;
 
-        new_size = max(strbuff->size * STRBUFFER_FACTOR,
+        new_size = MAX(strbuff->size * STRBUFFER_FACTOR,
                        strbuff->length + size + 1);
 
         new_value = jsonp_malloc(new_size);
index 1b02d90..48526b4 100644 (file)
@@ -440,7 +440,7 @@ static json_t **json_array_grow(json_array_t *array,
 
     old_table = array->table;
 
-    new_size = max(array->size + amount, array->size * 2);
+    new_size = MAX(array->size + amount, array->size * 2);
     new_table = jsonp_malloc(new_size * sizeof(json_t *));
     if(!new_table)
         return NULL;