diff -Naupr dangerdeep-0.3.0.orig/src/bspline_test.cpp dangerdeep-0.3.0/src/bspline_test.cpp
--- dangerdeep-0.3.0.orig/src/bspline_test.cpp	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/bspline_test.cpp	2013-03-30 15:04:50.897574674 +0100
@@ -1,5 +1,6 @@
 // some test code for the 2d bsplines!
 #include "bspline.h"
+#include <cstdlib>
 #include <fstream>
 using namespace std;
 
diff -Naupr dangerdeep-0.3.0.orig/src/convoy.h dangerdeep-0.3.0/src/convoy.h
--- dangerdeep-0.3.0.orig/src/convoy.h	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/convoy.h	2013-03-30 14:34:08.034525855 +0100
@@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite
 #include "vector2.h"
 #include <new>
 #include <list>
+#include <backward/auto_ptr.h>
 class ship;
 
 ///\brief Grouping of ships and other objects with central control.
diff -Naupr dangerdeep-0.3.0.orig/src/date.cpp dangerdeep-0.3.0/src/date.cpp
--- dangerdeep-0.3.0.orig/src/date.cpp	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/date.cpp	2013-03-30 14:59:31.976566226 +0100
@@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite
 // subsim (C)+(W) Markus Petermann and Thorsten Jordan. SEE LICENSE
 
 #include <iomanip>
+#include <cstdlib>
+#include <cstdio>
 #include "date.h"
 #include "texts.h"
 
diff -Naupr dangerdeep-0.3.0.orig/src/faulthandler.h dangerdeep-0.3.0/src/faulthandler.h
--- dangerdeep-0.3.0.orig/src/faulthandler.h	2007-06-11 20:29:30.000000000 +0200
+++ dangerdeep-0.3.0/src/faulthandler.h	2013-03-30 14:31:10.138521143 +0100
@@ -50,6 +50,8 @@ void install_segfault_handler()
 #include <signal.h>
 #include <string>
 #include <sstream>
+#include <unistd.h>
+#include <sys/types.h>
 
 // Note: use --export-dynamic as linker option or you won't get function names here.
 
diff -Naupr dangerdeep-0.3.0.orig/src/filehelper.cpp dangerdeep-0.3.0/src/filehelper.cpp
--- dangerdeep-0.3.0.orig/src/filehelper.cpp	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/filehelper.cpp	2013-03-30 15:00:44.564568149 +0100
@@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite
 #include "filehelper.h"
 #include "error.h"
 #include <vector>
+#include <cstdio>
 using namespace std;
 
 #ifdef WIN32
diff -Naupr dangerdeep-0.3.0.orig/src/ocean_wave_generator.h dangerdeep-0.3.0/src/ocean_wave_generator.h
--- dangerdeep-0.3.0.orig/src/ocean_wave_generator.h	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/ocean_wave_generator.h	2013-03-30 15:04:13.651573688 +0100
@@ -29,6 +29,7 @@ Foundation, Inc., 59 Temple Place, Suite
 #include "environment.h"
 #include <complex>
 #include <vector>
+#include <cstdlib>
 
 // use float fftw (faster) or double (default) ?
 #ifdef WITH_FLOAT_FFTW
diff -Naupr dangerdeep-0.3.0.orig/src/ptrlist.h dangerdeep-0.3.0/src/ptrlist.h
--- dangerdeep-0.3.0.orig/src/ptrlist.h	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/ptrlist.h	2013-03-30 14:32:37.129523447 +0100
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite
 
 #include <list>
 #include <stdexcept>
+#include <backward/auto_ptr.h>
 
 // same as std::list regarding the interface (partly), but handles pointers.
 template <class T>
diff -Naupr dangerdeep-0.3.0.orig/src/ptrvector.h dangerdeep-0.3.0/src/ptrvector.h
--- dangerdeep-0.3.0.orig/src/ptrvector.h	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/ptrvector.h	2013-03-30 14:33:16.263524484 +0100
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite
 
 #include <vector>
 #include <stdexcept>
+#include <backward/auto_ptr.h>
 
 // same as std::vector regarding the interface, but handles pointers.
 template <class T>
diff -Naupr dangerdeep-0.3.0.orig/src/widget.cpp dangerdeep-0.3.0/src/widget.cpp
--- dangerdeep-0.3.0.orig/src/widget.cpp	2007-06-11 17:16:23.000000000 +0200
+++ dangerdeep-0.3.0/src/widget.cpp	2013-03-30 15:02:12.631570482 +0100
@@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite
 #include "datadirs.h"
 #include <set>
 #include <sstream>
+#include <algorithm>
 using std::vector;
 using std::list;
 using std::string;
