diff -ur a/portable/libtorrent/include/libtorrent/peer_id.hpp b/portable/libtorrent/include/libtorrent/peer_id.hpp
--- a/portable/libtorrent/include/libtorrent/peer_id.hpp	2008-04-22 10:17:04.000000000 -0500
+++ b/portable/libtorrent/include/libtorrent/peer_id.hpp	2008-05-07 01:51:09.000000000 -0500
@@ -38,6 +38,7 @@
 #include <cctype>
 #include <algorithm>
 #include <string>
+#include <cstring>
 
 #include "libtorrent/config.hpp"
 #include "libtorrent/assert.hpp"
diff -ur a/portable/libtorrent/src/entry.cpp b/portable/libtorrent/src/entry.cpp
--- a/portable/libtorrent/src/entry.cpp	2008-04-22 10:17:04.000000000 -0500
+++ b/portable/libtorrent/src/entry.cpp	2008-05-07 02:16:14.000000000 -0500
@@ -33,6 +33,7 @@
 #include "libtorrent/pch.hpp"
 
 #include <algorithm>
+#include <iostream>
 #include <iomanip>
 #include "libtorrent/entry.hpp"
 #include "libtorrent/config.hpp"
diff -ur a/portable/libtorrent/src/file.cpp b/portable/libtorrent/src/file.cpp
--- a/portable/libtorrent/src/file.cpp	2008-04-22 10:17:04.000000000 -0500
+++ b/portable/libtorrent/src/file.cpp	2008-05-07 01:53:04.000000000 -0500
@@ -68,6 +68,7 @@
 #include <boost/filesystem/operations.hpp>
 #include "libtorrent/file.hpp"
 #include <sstream>
+#include <cstring>
 
 #ifndef O_BINARY
 #define O_BINARY 0