diff --git a/src/zmalloc.c b/src/zmalloc.c index ec7fcc03..639a5fe2 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -388,6 +388,14 @@ int jemalloc_purge() { #endif +#if defined(__APPLE__) +/* For proc_pidinfo() used later in zmalloc_get_smap_bytes_by_field(). + * Note that this file cannot be included in zmalloc.h because it includes + * a Darwin queue.h file where there is a "LIST_HEAD" macro (!) defined + * conficting with Redis user code. */ +#include +#endif + /* Get the sum of the specified field (converted form kb to bytes) in * /proc/self/smaps. The field must be specified with trailing ":" as it * apperas in the smaps output. diff --git a/src/zmalloc.h b/src/zmalloc.h index d32698e6..b136a910 100644 --- a/src/zmalloc.h +++ b/src/zmalloc.h @@ -57,7 +57,6 @@ #elif defined(__APPLE__) #include -#include #define HAVE_MALLOC_SIZE 1 #define zmalloc_size(p) malloc_size(p) #endif