Index: src/test/cpp/logunit.cpp
===================================================================
--- src/test/cpp/logunit.cpp	(revision 620195)
+++ src/test/cpp/logunit.cpp	(working copy)
@@ -21,6 +21,7 @@
 #include "logunit.h"
 
 #include <apr_general.h>
+#include <algorithm>
 
 void initialize() {
     apr_initialize();
Index: src/main/cpp/bytearrayoutputstream.cpp
===================================================================
--- src/main/cpp/bytearrayoutputstream.cpp	(revision 620195)
+++ src/main/cpp/bytearrayoutputstream.cpp	(working copy)
@@ -19,6 +19,7 @@
 #include <log4cxx/helpers/bytearrayoutputstream.h>
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/bytebuffer.h>
+#include <string.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
Index: src/main/cpp/nameabbreviator.cpp
===================================================================
--- src/main/cpp/nameabbreviator.cpp	(revision 620195)
+++ src/main/cpp/nameabbreviator.cpp	(working copy)
@@ -19,6 +19,7 @@
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/helpers/stringhelper.h>
 #include <vector>
+#include <limits.h>
 
 using namespace log4cxx;
 using namespace log4cxx::pattern;
Index: src/examples/cpp/delayedloop.cpp
===================================================================
--- src/examples/cpp/delayedloop.cpp	(revision 620195)
+++ src/examples/cpp/delayedloop.cpp	(working copy)
@@ -23,6 +23,7 @@
 #include <iostream>
 #include <log4cxx/stream.h>
 #include <exception>
+#include <stdlib.h>
 
 using namespace log4cxx;
 using namespace log4cxx::helpers;
