diff options
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/malloc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 7889fb1961..f8e7250f70 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -223,6 +223,7 @@ #include <unistd.h> #include <stdio.h> /* needed for malloc_stats */ #include <errno.h> +#include <assert.h> #include <shlib-compat.h> @@ -278,13 +279,9 @@ #define MALLOC_DEBUG 0 #endif -#ifdef NDEBUG -# define assert(expr) ((void) 0) -#else -# define assert(expr) \ - ((expr) \ - ? ((void) 0) \ - : __malloc_assert (#expr, __FILE__, __LINE__, __func__)) +#ifndef NDEBUG +# define __assert_fail(assertion, file, line, function) \ + __malloc_assert(assertion, file, line, function) extern const char *__progname; |