summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dict.c2
-rw-r--r--src/pqsort.c1
-rw-r--r--src/redisassert.h4
-rw-r--r--src/ziplist.c2
-rw-r--r--src/zipmap.c1
5 files changed, 5 insertions, 5 deletions
diff --git a/src/dict.c b/src/dict.c
index a534ddee8..d2ff4a9ac 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -39,13 +39,13 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
-#include <assert.h>
#include <limits.h>
#include <sys/time.h>
#include <ctype.h>
#include "dict.h"
#include "zmalloc.h"
+#include "redisassert.h"
/* Using dictEnableResize() / dictDisableResize() we make possible to
* enable/disable resizing of the hash table as needed. This is very important
diff --git a/src/pqsort.c b/src/pqsort.c
index 9c57aacd0..1108093a3 100644
--- a/src/pqsort.c
+++ b/src/pqsort.c
@@ -39,7 +39,6 @@
#include <sys/types.h>
-#include <assert.h>
#include <errno.h>
#include <stdlib.h>
diff --git a/src/redisassert.h b/src/redisassert.h
index e2cf47cb5..e5825c0f5 100644
--- a/src/redisassert.h
+++ b/src/redisassert.h
@@ -38,7 +38,9 @@
#ifndef __REDIS_ASSERT_H__
#define __REDIS_ASSERT_H__
-#define redisAssert(_e) ((_e)?(void)0 : (_redisAssert(#_e,__FILE__,__LINE__),_exit(1)))
+#include <unistd.h> /* for _exit() */
+
+#define assert(_e) ((_e)?(void)0 : (_redisAssert(#_e,__FILE__,__LINE__),_exit(1)))
void _redisAssert(char *estr, char *file, int line);
diff --git a/src/ziplist.c b/src/ziplist.c
index 8a6b54a7c..926a1b627 100644
--- a/src/ziplist.c
+++ b/src/ziplist.c
@@ -105,12 +105,12 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
-#include <assert.h>
#include <limits.h>
#include "zmalloc.h"
#include "util.h"
#include "ziplist.h"
#include "endianconv.h"
+#include "redisassert.h"
#define ZIP_END 255
#define ZIP_BIGLEN 254
diff --git a/src/zipmap.c b/src/zipmap.c
index d9b7c8b31..3cd56e5ff 100644
--- a/src/zipmap.c
+++ b/src/zipmap.c
@@ -78,7 +78,6 @@
#include <stdio.h>
#include <string.h>
-#include <assert.h>
#include "zmalloc.h"
#include "endianconv.h"