--- courier-0.58.0.orig/courier/libs/comaliases2.C	2007-06-28 04:24:09.000000000 +0200
+++ courier-0.58.0/courier/libs/comaliases2.C	2007-12-14 12:10:02.330369590 +0100
@@ -5,6 +5,7 @@
 
 #include	"aliases.h"
 #include	"courier.h"
+#include	<string.h>
 
 //
 // MAXRECSIZE is the median GDBM record size makealiases creates.  The actual
--- courier-0.58.0.orig/courier/libs/comaliases4.C	2007-06-28 04:24:09.000000000 +0200
+++ courier-0.58.0/courier/libs/comaliases4.C	2007-12-14 12:32:29.300226992 +0100
@@ -10,6 +10,7 @@
 #include	"rw.h"
 #include	<stdio.h>
 #include	<errno.h>
+#include	<string.h>
 
 #if	HAVE_LDAP
 #include	"ldapaliasdrc.h"
--- courier-0.58.0.orig/courier/libs/testaliases.C	2007-07-28 14:39:12.000000000 +0200
+++ courier-0.58.0/courier/libs/testaliases.C	2007-12-14 12:58:26.377029905 +0100
@@ -1,5 +1,6 @@
 #include "aliases.h"
 
+#include <string.h>
 #include <unistd.h>
 #include <iostream>
 #include <set>
--- courier-0.58.0.orig/courier/cmlm.C	2007-07-30 02:25:58.000000000 +0200
+++ courier-0.58.0/courier/cmlm.C	2007-12-14 13:23:56.868455427 +0100
@@ -27,6 +27,7 @@
 #include	<unistd.h>
 #include	<stdlib.h>
 #include	<stdio.h>
+#include	<string.h>
 #include	<errno.h>
 #include	<ctype.h>
 #include	<time.h>
--- courier-0.58.0.orig/courier/cmlm2.C	2007-08-30 03:38:49.000000000 +0200
+++ courier-0.58.0/courier/cmlm2.C	2007-12-14 13:49:07.134841326 +0100
@@ -11,6 +11,7 @@
 #include	"unicode/unicode.h"
 #include	<fcntl.h>
 #include	<unistd.h>
+#include	<string.h>
 #include	<langinfo.h>
 #include	<fstream>
 
--- courier-0.58.0.orig/courier/cmlm3.C	2007-06-28 04:27:24.000000000 +0200
+++ courier-0.58.0/courier/cmlm3.C	2007-12-14 14:10:28.014469990 +0100
@@ -14,6 +14,7 @@
 
 #include	<ctype.h>
 #include	<time.h>
+#include	<string.h>
 #include	<iostream>
 #include	<fstream>
 #include	<list>
--- courier-0.58.0.orig/courier/cmlmarchive.C	2007-03-01 05:32:16.000000000 +0100
+++ courier-0.58.0/courier/cmlmarchive.C	2007-12-14 14:32:01.792381627 +0100
@@ -9,6 +9,7 @@
 #include	"numlib/numlib.h"
 #include	<sys/types.h>
 #include	<sys/stat.h>
+#include	<string.h>
 #include	<fcntl.h>
 #include	<errno.h>
 #include	<sysexits.h>
--- courier-0.58.0.orig/courier/cmlmmoderate.C	2007-06-28 04:27:24.000000000 +0200
+++ courier-0.58.0/courier/cmlmmoderate.C	2007-12-17 10:18:42.953972036 +0100
@@ -12,6 +12,7 @@
 #include	<sys/stat.h>
 #include	<signal.h>
 #include	<sysexits.h>
+#include	<string.h>
 
 static const char rcsid[]="$Id: gcc34.patch,v 1.10 2007/12/18 00:11:43 racke Exp $";
 
--- courier-0.58.0.orig/courier/cmlmsublist.C	2007-03-01 05:32:16.000000000 +0100
+++ courier-0.58.0/courier/cmlmsublist.C	2007-12-17 10:45:10.645865660 +0100
@@ -5,6 +5,7 @@
 
 #include	"config.h"
 #include	"cmlmsublist.h"
+#include	<string.h>
 
 static const char rcsid[]="$Id: gcc34.patch,v 1.10 2007/12/18 00:11:43 racke Exp $";
 
--- courier-0.58.0.orig/courier/cmlmsubunsubmsg.C	2007-06-28 04:27:24.000000000 +0200
+++ courier-0.58.0/courier/cmlmsubunsubmsg.C	2007-12-17 11:11:13.176080359 +0100
@@ -16,6 +16,7 @@
 #include	<time.h>
 #include	<errno.h>
 #include	<sysexits.h>
+#include	<string.h>
 
 static const char rcsid[]="$Id: gcc34.patch,v 1.10 2007/12/18 00:11:43 racke Exp $";
 //
--- courier-0.58.0.orig/courier/webmlmdcmlm.C	2007-05-20 02:04:55.000000000 +0200
+++ courier-0.58.0/courier/webmlmdcmlm.C	2007-12-17 13:10:47.132179212 +0100
@@ -8,8 +8,9 @@
 #include	"webmlmd.H"
 #include	"webmlmdcmlm.H"
 #include	<sstream>
 #include	<errno.h>
 #include	<stdlib.h>
+#include	<string.h>
 #if	HAVE_UNISTD_H
 #include	<unistd.h>
 #endif
--- courier-0.58.0.orig/courier/webmlmd.H	2007-06-16 04:21:24.000000000 +0200
+++ courier-0.58.0/courier/webmlmd.H	2007-12-17 14:36:21.247710438 +0100
@@ -11,6 +11,7 @@
 #include <list>
 #include <string>
 #include <map>
+#include <algorithm>
 
 namespace webmlmd {
 	std::string list_name();
--- courier-0.58.0.orig/courier/cddrvinfo.C	2007-07-30 00:54:28.000000000 +0200
+++ courier-0.58.0/courier/cddrvinfo.C	2007-12-17 15:00:03.277805512 +0100
@@ -17,6 +17,7 @@
 #include	"rw.h"
 #include	"maxlongsize.h"
 #include	<stdlib.h>
+#include	<string.h>
 #if	HAVE_UNISTD_H
 #include	<unistd.h>
 #endif
--- courier-0.58.0.orig/courier/cdmsgq.C	2007-08-04 15:34:26.000000000 +0200
+++ courier-0.58.0/courier/cdmsgq.C	2007-12-17 15:33:29.695929291 +0100
@@ -24,6 +24,7 @@
 #include	<ctype.h>
 #include	<errno.h>
 #include	<stdlib.h>
+#include	<string.h>
 #if HAVE_UNISTD_H
 #include	<unistd.h>
 #endif
--- courier-0.58.0.orig/courier/cdmsgq3.C	2007-07-30 01:04:25.000000000 +0200
+++ courier-0.58.0/courier/cdmsgq3.C	2007-12-17 16:20:34.833179903 +0100
@@ -24,6 +24,7 @@
 #include	<sys/stat.h>
 #endif
 #include	<stdlib.h>
+#include	<string.h>
 #include	<errno.h>
 #include	<sys/uio.h>
 #include	<time.h>
--- courier-0.58.0.orig/courier/courierd.C	2007-07-30 01:04:54.000000000 +0200
+++ courier-0.58.0/courier/courierd.C	2007-12-17 21:24:40.956017652 +0100
@@ -45,6 +45,7 @@
 #endif
 #endif
 #include	<stdio.h>
+#include	<string.h>
 #include	<errno.h>
 #include	<signal.h>
 
--- courier-0.58.0.orig/courier/aliascombine.C	2007-07-30 02:25:57.000000000 +0200
+++ courier-0.58.0/courier/aliascombine.C	2007-12-17 23:02:41.550442413 +0100
@@ -16,6 +16,7 @@
 #include	<unistd.h>
 #endif
 #include	<string>
+#include	<algorithm>
 #include	<sstream>
 #include	<iostream>
 #include	"dbobj.h"
--- courier-0.58.0.orig/courier/submit2.C	2007-10-15 03:34:11.000000000 +0200
+++ courier-0.58.0/courier/submit2.C	2007-12-17 23:27:48.276678273 +0100
@@ -23,6 +23,7 @@
 #include	<string.h>
 #include	<fcntl.h>
 #include	<errno.h>
+#include	<algorithm>
 #include	<iostream>
 #include	<iomanip>
 #if HAVE_SYS_TYPES_H
--- courier-0.58.0.orig/courier/cdfilters.C	2007-08-05 02:05:42.000000000 +0200
+++ courier-0.58.0/courier/cdfilters.C	2007-12-17 23:56:30.278091372 +0100
@@ -16,6 +16,7 @@
 #include	<errno.h>
 #include	<ctype.h>
 
+#include	<algorithm>
 #include	<iostream>
 #include	<vector>
 
--- courier-0.58.0.orig/courier/aliaslookup.C	2006-03-26 17:11:15.000000000 +0200
+++ courier-0.58.0/courier/aliaslookup.C	2007-12-18 00:39:03.066484399 +0100
@@ -6,6 +6,7 @@
 #include	"courier.h"
 #include	"aliases.h"
 
+#include	<string.h>
 #include	<iostream>
 
 class MyAliasHandler : public AliasHandler {
