diff -Naur smtpmap-0.8.234-BETA.orig/include/bintree.h smtpmap-0.8.234-BETA/include/bintree.h
--- smtpmap-0.8.234-BETA.orig/include/bintree.h	2003-02-25 20:50:31.000000000 +0100
+++ smtpmap-0.8.234-BETA/include/bintree.h	2006-06-30 01:23:11.000000000 +0200
@@ -17,6 +17,11 @@
 class treenode;
 template <class Key,class Data>
 class bintreeiterator;
+
+// forward declarations to allow friend declarations
+template <class Key,class Data> class bintree;
+template <class Key,class Data> ostream& operator<< (ostream & o, const bintree<Key,Data> & t);
+
 template <class Key,class Data>
 class bintree /*{{{*/
 {
@@ -398,6 +403,13 @@
     Root = NULL;
 }/*}}}*/
 enum avl_tree_skew { left, right, noone };
+
+// forward declarations to allow friend declarations
+template <class Key,class Data> class treenode;
+template <class Key,class Data> ostream& operator<< ( ostream & o, const treenode<Key,Data> & v);
+template <class Key,class Data> bool operator < ( const treenode<Key,Data> & a, const treenode<Key,Data> & b);
+template <class Key,class Data> bool operator > ( const treenode<Key,Data> & a, const treenode<Key,Data> & b);
+
 template <class Key,class Data>
 class treenode/*{{{*/
 {
diff -Naur smtpmap-0.8.234-BETA.orig/include/dllist.h smtpmap-0.8.234-BETA/include/dllist.h
--- smtpmap-0.8.234-BETA.orig/include/dllist.h	2003-04-17 00:23:59.000000000 +0200
+++ smtpmap-0.8.234-BETA/include/dllist.h	2006-06-30 00:52:30.000000000 +0200
@@ -31,6 +31,12 @@
 // ********** definition dllist class
 // **********
 
+// forward declarations to allow friend declarations
+template <class T> class dllist;
+template <class T> ostream & operator<< ( ostream& o , const dllist<T> & v);
+template <class T> bool operator < ( const dllist<T> & a, const dllist<T> & b) ;
+template <class T> bool operator > ( const dllist<T> & a, const dllist<T> & b) ;
+
 template <class T>
 class dllist/*{{{*/
 {
@@ -408,6 +414,13 @@
  * These Nodes contain the actual elements fo the list
  * together with the control data
  */
+
+// forward declarations to allow friend declarations
+template <class T> class dllnode;
+template <class T> ostream& operator<< ( ostream & o, const dllnode<T> & v);
+template <class T> bool operator < ( const dllnode<T> & a, const dllnode<T> & b);
+template <class T> bool operator > ( const dllnode<T> & a, const dllnode<T> & b);
+
 template <class T>
 class dllnode/*{{{*/
 {
diff -Naur smtpmap-0.8.234-BETA.orig/src/smtpmap.cpp smtpmap-0.8.234-BETA/src/smtpmap.cpp
--- smtpmap-0.8.234-BETA.orig/src/smtpmap.cpp	2003-04-09 19:54:10.000000000 +0200
+++ smtpmap-0.8.234-BETA/src/smtpmap.cpp	2006-06-30 01:18:38.000000000 +0200
@@ -455,7 +455,7 @@
 		    cout << "Note: More than -v -v -v will not produce more verbositiy" << endl; 
 		    break;
 		}
-		((int)debuglevel)++;
+		(*(int**)&debuglevel)++;
 		break;
 	    case 'V':
 		cout << "smtp-map " << VERSION << endl;
