The attached patch should fix this problem. In addition to installing system.h in apt-pkg, it's necessary to update all the #includes to refer to it as <apt-pkg/system.h> instead of just <system.h>.
Daniel
diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-inst/contrib/extracttar.cc apt-0.7.25.3~local1/apt-inst/contrib/extracttar.cc --- apt-0.7.25.2/apt-inst/contrib/extracttar.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-inst/contrib/extracttar.cc 2010-01-30 08:12:57.000000000 -0800 @@ -21,7 +21,7 @@ #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> -#include <system.h> +#include <apt-pkg/system.h> #include <stdlib.h> #include <unistd.h> diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/contrib/error.h apt-0.7.25.3~local1/apt-pkg/contrib/error.h --- apt-0.7.25.2/apt-pkg/contrib/error.h 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/contrib/error.h 2010-01-30 08:05:45.000000000 -0800 @@ -53,7 +53,7 @@ #include <string> -#include <system.h> +#include <apt-pkg/system.h> using std::string; diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/contrib/hashes.cc apt-0.7.25.3~local1/apt-pkg/contrib/hashes.cc --- apt-0.7.25.2/apt-pkg/contrib/hashes.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/contrib/hashes.cc 2010-01-30 08:08:34.000000000 -0800 @@ -14,9 +14,9 @@ #include <apt-pkg/hashes.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/system.h> #include <unistd.h> -#include <system.h> #include <string> #include <iostream> /*}}}*/ diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/contrib/md5.cc apt-0.7.25.3~local1/apt-pkg/contrib/md5.cc --- apt-0.7.25.2/apt-pkg/contrib/md5.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/contrib/md5.cc 2010-01-30 08:06:44.000000000 -0800 @@ -37,13 +37,13 @@ // Include Files /*{{{*/ #include <apt-pkg/md5.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/system.h> #include <string.h> #include <unistd.h> #include <netinet/in.h> // For htonl #include <inttypes.h> #include <config.h> -#include <system.h> /*}}}*/ diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/contrib/sha1.cc apt-0.7.25.3~local1/apt-pkg/contrib/sha1.cc --- apt-0.7.25.2/apt-pkg/contrib/sha1.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/contrib/sha1.cc 2010-01-30 08:08:05.000000000 -0800 @@ -31,13 +31,12 @@ // Include Files /*{{{*/ #include <apt-pkg/sha1.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/system.h> #include <string.h> #include <unistd.h> #include <inttypes.h> #include <config.h> -#include <system.h> - /*}}}*/ // SHA1Transform - Alters an existing SHA-1 hash /*{{{*/ // --------------------------------------------------------------------- diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/deb/deblistparser.cc apt-0.7.25.3~local1/apt-pkg/deb/deblistparser.cc --- apt-0.7.25.2/apt-pkg/deb/deblistparser.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/deb/deblistparser.cc 2010-01-30 08:11:09.000000000 -0800 @@ -16,11 +16,9 @@ #include <apt-pkg/strutl.h> #include <apt-pkg/crc-16.h> #include <apt-pkg/md5.h> - -#include <ctype.h> - -#include <system.h> +#include <apt-pkg/system.h> /*}}}*/ +#include <ctype.h> static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important}, {"required",pkgCache::State::Required}, diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/makefile apt-0.7.25.3~local1/apt-pkg/makefile --- apt-0.7.25.2/apt-pkg/makefile 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/makefile 2010-01-30 08:04:21.000000000 -0800 @@ -24,7 +24,8 @@ contrib/cdromutl.cc contrib/crc-16.cc contrib/netrc.cc \ contrib/fileutl.cc HEADERS = mmap.h error.h configuration.h fileutl.h cmndline.h netrc.h\ - md5.h crc-16.h cdromutl.h strutl.h sptr.h sha1.h sha256.h hashes.h + md5.h crc-16.h cdromutl.h strutl.h sptr.h sha1.h sha256.h hashes.h \ + system.h # Source code for the core main library SOURCE+= pkgcache.cc version.cc depcache.cc \ diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/pkgcache.cc apt-0.7.25.3~local1/apt-pkg/pkgcache.cc --- apt-0.7.25.2/apt-pkg/pkgcache.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/pkgcache.cc 2010-01-30 08:09:04.000000000 -0800 @@ -27,6 +27,7 @@ #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> #include <apt-pkg/configuration.h> +#include <apt-pkg/system.h> #include <apti18n.h> @@ -35,7 +36,6 @@ #include <unistd.h> #include <ctype.h> -#include <system.h> /*}}}*/ using std::string; diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/apt-pkg/pkgcachegen.cc apt-0.7.25.3~local1/apt-pkg/pkgcachegen.cc --- apt-0.7.25.2/apt-pkg/pkgcachegen.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/apt-pkg/pkgcachegen.cc 2010-01-30 08:09:28.000000000 -0800 @@ -21,7 +21,7 @@ #include <apt-pkg/strutl.h> #include <apt-pkg/sptr.h> #include <apt-pkg/pkgsystem.h> - +#include <apt-pkg/system.h> #include <apt-pkg/tagfile.h> #include <apti18n.h> @@ -32,7 +32,6 @@ #include <unistd.h> #include <errno.h> #include <stdio.h> -#include <system.h> /*}}}*/ typedef vector<pkgIndexFile *>::iterator FileIterator; diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/configure.in apt-0.7.25.3~local1/configure.in --- apt-0.7.25.2/configure.in 2010-01-27 12:51:42.000000000 -0800 +++ apt-0.7.25.3~local1/configure.in 2010-01-30 08:02:57.000000000 -0800 @@ -18,7 +18,7 @@ AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.7.25.2") +AC_DEFINE_UNQUOTED(VERSION,"0.7.25.3~local1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff -Nru --exclude configure --exclude changelog --exclude '*.pot' --exclude '*.po' apt-0.7.25.2/test/versiontest.cc apt-0.7.25.3~local1/test/versiontest.cc --- apt-0.7.25.2/test/versiontest.cc 2010-01-27 12:49:24.000000000 -0800 +++ apt-0.7.25.3~local1/test/versiontest.cc 2010-01-30 08:12:43.000000000 -0800 @@ -14,7 +14,7 @@ ##################################################################### */ /*}}}*/ -#include <system.h> +#include <apt-pkg/system.h> #include <apt-pkg/error.h> #include <apt-pkg/version.h> #include <apt-pkg/debversion.h>