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