diff options
Diffstat (limited to 'src/lib/util/corealloc.h')
-rw-r--r-- | src/lib/util/corealloc.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h index eb97e643686..5cd481824ed 100644 --- a/src/lib/util/corealloc.h +++ b/src/lib/util/corealloc.h @@ -87,14 +87,18 @@ extern const zeromem_t zeromem; #ifndef NO_MEM_TRACKING // re-route classic malloc-style allocations #undef malloc -#undef calloc #undef realloc #undef free #define malloc(x) malloc_file_line(x, __FILE__, __LINE__, true, false, false) -#define calloc(x,y) __error_use_auto_alloc_clear_or_global_alloc_clear_instead__ #define realloc(x,y) __error_realloc_is_dangerous__ #define free(x) free_file_line(x, __FILE__, __LINE__, true) + +#if !defined(_MSC_VER) || _MSC_VER < 1900 // < VS2015 +#undef calloc +#define calloc(x,y) __error_use_auto_alloc_clear_or_global_alloc_clear_instead__ +#endif + #endif #endif /* __COREALLOC_H__ */ |