--- a/libdb/db_btree.c
+++ b/libdb/db_btree.c
@@ -29,6 +29,7 @@
#ifdef BTREE
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <string.h>