diff --git a/lib/mm/dbg_malloc.c b/lib/mm/dbg_malloc.c index 8d5023622..9824941c7 100644 --- a/lib/mm/dbg_malloc.c +++ b/lib/mm/dbg_malloc.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "dbg_malloc.h" #include "log/log.h" diff --git a/lib/mm/pool.c b/lib/mm/pool.c index ec439e6ee..c4d526a26 100644 --- a/lib/mm/pool.c +++ b/lib/mm/pool.c @@ -19,13 +19,13 @@ * Boston, MA 02111-1307, USA. * */ +#include +#include #include "pool.h" #include "dbg_malloc.h" #include "log/log.h" -#include - struct chunk { char *begin, *end; struct chunk *prev; @@ -199,7 +199,7 @@ char *pool_strdup(struct pool *p, const char *str) void _align_chunk(struct chunk *c, unsigned alignment) { - c->begin += alignment - ((unsigned) c->begin & (alignment - 1)); + c->begin += alignment - ((unsigned long) c->begin & (alignment - 1)); } struct chunk *_new_chunk(struct pool *p, size_t s)