--- src/tools/text2ngram.cpp.orig	2008-06-02 13:29:00 UTC
+++ src/tools/text2ngram.cpp
@@ -29,6 +29,7 @@
 #include <list>
 #include <string>
 #include <map>
+#include <cstdlib>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
