diff --git a/include/zmalloc.h b/include/zmalloc.h index 383f377..cacfb92 100644 --- a/include/zmalloc.h +++ b/include/zmalloc.h @@ -45,7 +45,7 @@ #error "Newer version of tcmalloc required" #endif -#elif defined(USE_JEMALLOC) +#elif defined(USE_JEMALLOC) && (JEMALLOC_VERSION_MAJOR > 2) #define ZMALLOC_LIB ("jemalloc-" __xstr(JEMALLOC_VERSION_MAJOR) "." __xstr(JEMALLOC_VERSION_MINOR) "." __xstr(JEMALLOC_VERSION_BUGFIX)) #include #if (JEMALLOC_VERSION_MAJOR == 2 && JEMALLOC_VERSION_MINOR >= 1) || (JEMALLOC_VERSION_MAJOR > 2) diff --git a/src/zmalloc.c b/src/zmalloc.c index fad1c2b..44f6d6a 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -60,7 +60,7 @@ void zlibc_free(void *ptr) { #define calloc(count,size) tc_calloc(count,size) #define realloc(ptr,size) tc_realloc(ptr,size) #define free(ptr) tc_free(ptr) -#elif defined(USE_JEMALLOC) +#elif defined(USE_JEMALLOC) && (JEMALLOC_VERSION_MAJOR > 2) #include #define malloc(size) je_malloc(size) #define calloc(count,size) je_calloc(count,size)