From 4c62df8a4efdbccccf8a3fd38707e9934ff12900 Mon Sep 17 00:00:00 2001 From: itamar Date: Tue, 3 Jan 2017 19:36:53 +0200 Subject: [PATCH] Undefs strdup before overriding it in alloc.h --- rmutil/alloc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rmutil/alloc.h b/rmutil/alloc.h index 3684288..1a363d2 100644 --- a/rmutil/alloc.h +++ b/rmutil/alloc.h @@ -27,10 +27,14 @@ char *rmalloc_strndup(const char *s, size_t n); #define calloc(count, size) RedisModule_Calloc(count, size) #define realloc(ptr, size) RedisModule_Realloc(ptr, size) #define free(ptr) RedisModule_Free(ptr) + +#ifdef strdup +#undef strdup +#endif #define strdup(ptr) RedisModule_Strdup(ptr) -// /* More overriding */ -// // needed to avoid calling strndup->malloc +/* More overriding */ +// needed to avoid calling strndup->malloc #ifdef strndup #undef strndup #endif