diff -ruN apt-0.5.14-orig/apt-pkg/contrib/mmap.cc apt-0.5.14/apt-pkg/contrib/mmap.cc
--- apt-0.5.14-orig/apt-pkg/contrib/mmap.cc	Sun May 27 07:19:30 2001
+++ apt-0.5.14/apt-pkg/contrib/mmap.cc	Sat Jan 31 10:43:45 2004
@@ -31,6 +31,7 @@
 
 #include <apti18n.h>
 
+#include <sys/types.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <unistd.h>
diff -ruN apt-0.5.14-orig/apt-pkg/init.cc apt-0.5.14/apt-pkg/init.cc
--- apt-0.5.14-orig/apt-pkg/init.cc	Sun Apr 20 18:48:55 2003
+++ apt-0.5.14/apt-pkg/init.cc	Sat Jan 31 13:20:20 2004
@@ -11,6 +11,7 @@
 #include <apt-pkg/init.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
+#include <../apt-pkg/deb/debsystem.h>
 
 #include <apti18n.h>
 #include <config.h>
@@ -110,6 +111,7 @@
 /* */
 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys)
 {
+   assert(&debSys!=0);
    Sys = 0;
    string Label = Cnf.Find("Apt::System","");
    if (Label.empty() == false)
