diff -ur amule-cvs-orig/configure.in amule-cvs/configure.in
--- amule-cvs-orig/configure.in	2007-05-31 14:37:22.000000000 +0100
+++ amule-cvs/configure.in	2007-05-30 12:56:54.000000000 +0100
@@ -490,10 +490,11 @@
 AC_FUNC_LSTAT
 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
 fi
-AC_FUNC_MALLOC
+#Broken when cross compiling
+#AC_FUNC_MALLOC
 AC_FUNC_MEMCMP
 AC_FUNC_MMAP
-AC_FUNC_REALLOC
+#AC_FUNC_REALLOC
 AC_FUNC_SELECT_ARGTYPES
 AC_FUNC_SETVBUF_REVERSED
 AC_TYPE_SIGNAL
diff -ur amule-cvs-orig/m4/zlib.m4 amule-cvs/m4/zlib.m4
--- amule-cvs-orig/m4/zlib.m4	2007-05-31 14:37:22.000000000 +0100
+++ amule-cvs/m4/zlib.m4	2007-05-30 14:07:28.000000000 +0100
@@ -88,36 +88,10 @@
 		result=no
 		AC_MSG_RESULT($result)
 	], [
-		result=no
-		z_version=''
-		AC_LINK_IFELSE([
-			AC_LANG_PROGRAM([[
-				#include <zlib.h>
-			]], [[
-				const char zver[] = "\nZLIB_VERSION_START" ZLIB_VERSION "ZLIB_VERSION_END\n";
-				zlibVersion();
-			]])
-		], [
-			ZLIB_VERSION=`grep -a '^ZLIB_VERSION_START.*ZLIB_VERSION_END$' conftest$ac_exeext | sed 's/^ZLIB_VERSION_START\(.*\)ZLIB_VERSION_END$/\1/'`
-			ac_cross_zver_max="`echo $ZLIB_VERSION | cut -d. -f1`"
-			ac_cross_zver_mid="`echo $ZLIB_VERSION | cut -d. -f2`"
-			ac_cross_zver_min="`echo $ZLIB_VERSION | cut -d. -f3`"
-			if test "$ac_cross_zver_max" -gt "$ac_zver_max"; then
-				result=yes
-			elif test "$ac_cross_zver_max" -eq "$ac_zver_max"; then
-				if test "$ac_cross_zver_mid" -gt "$ac_zver_mid"; then
-					result=yes
-				elif "$ac_cross_zver_mid" -eq "$ac_zver_mid"; then
-					if test "$ac_cross_zver_min" -ge "$ac_zver_min"; then
-						result=yes
-					fi
-				fi
-			fi
-			if test x$result = xyes; then
-				z_version=" (version $ZLIB_VERSION)"
-			fi
-		])
-		AC_MSG_RESULT($result$z_version)
+		z=sys
+		AC_MSG_RESULT([cross-compilation detected, checking only the header])
+		AC_CHECK_HEADER(zlib.h, [result=yes], [result=no])
+		ZLIB_VERSION="detected"
 	])
 	if test x$result = xno; then
 		if test "${ac_tmp_CPPFLAGS+set}" = set; then
diff -ur amule-cvs-orig/src/amule.cpp amule-cvs/src/amule.cpp
--- amule-cvs-orig/src/amule.cpp	2007-05-31 14:37:23.000000000 +0100
+++ amule-cvs/src/amule.cpp	2007-05-30 17:53:05.000000000 +0100
@@ -542,7 +542,7 @@
 		printf("Your settings have ben resetted to default values.\nOld config file has been saved as amule.conf.backup\n");
 	}
 	
-#if defined(__WXMAC__) && defined(AMULE_DAEMON)
+#if defined(AMULE_DAEMON)
 	#warning TODO: fix wxSingleInstanceChecker for amuled on Mac (wx link problems)
 	printf("WARNING: The check for other instances is currently disabled in amuled.\n"
 		"Please make sure that no other instance of aMule is running or your files might be corrupted.\n");
diff -ur amule-cvs-orig/src/DownloadClient.cpp amule-cvs/src/DownloadClient.cpp
--- amule-cvs-orig/src/DownloadClient.cpp	2007-05-31 14:37:23.000000000 +0100
+++ amule-cvs/src/DownloadClient.cpp	2007-05-30 12:56:54.000000000 +0100
@@ -33,7 +33,7 @@
 #include <include/common/Constants.h>
 
 #include <zlib.h>
-#include <cmath>		// Needed for std:exp
+#include <math.h>		// Needed for std:exp
 
 #include "ClientCredits.h"	// Needed for CClientCredits
 #include "ClientUDPSocket.h"	// Needed for CClientUDPSocket
@@ -1176,8 +1176,7 @@
 	
 	const	float fInit  = tcLoop/tcInit;		// initial averaging factor
 	const	float fFinal = tcLoop/tcFinal;		// final averaging factor
-	const	float fReduce = std::exp(std::log(fFinal/fInit) / (tcReduce/tcLoop)) * 0.99999;
-	
+	const   float fReduce = ::exp(::log(fFinal/fInit) / (tcReduce/tcLoop)) * 0.99999;	
 	uint32	msCur = ::GetTickCount();
 
 	if (msReceivedPrev == 0) {  // initialize the averaging filter
diff -ur amule-cvs-orig/src/libs/common/MuleDebug.cpp amule-cvs/src/libs/common/MuleDebug.cpp
--- amule-cvs-orig/src/libs/common/MuleDebug.cpp	2007-05-31 14:37:23.000000000 +0100
+++ amule-cvs/src/libs/common/MuleDebug.cpp	2007-05-30 12:56:54.000000000 +0100
@@ -30,7 +30,8 @@
 #include "StringFunctions.h"	// Needed for unicode2char
 
 #ifdef __LINUX__
-	#include <execinfo.h>
+//Doesn't exist when cross compiling
+//	#include <execinfo.h>
 	#include <cxxabi.h>
 #endif
 
@@ -281,6 +282,7 @@
 // Print a stack backtrace if available
 wxString get_backtrace(unsigned n)
 {
+#if 0
 	// (stkn) create backtrace
 	void *bt_array[100];	// 100 should be enough ?!?
 	char **bt_strings;
@@ -425,7 +427,8 @@
 		trace += btLine + wxT("\n");
 	}
 
-	return trace;
+#endif
+	return wxString();
 }
 
 #else	/* !__LINUX__ */
diff -ur amule-cvs-orig/src/libs/ec/cpp/ECTag.cpp amule-cvs/src/libs/ec/cpp/ECTag.cpp
--- amule-cvs-orig/src/libs/ec/cpp/ECTag.cpp	2007-05-31 14:37:23.000000000 +0100
+++ amule-cvs/src/libs/ec/cpp/ECTag.cpp	2007-05-30 12:56:54.000000000 +0100
@@ -685,6 +685,25 @@
 	}	
 }
 
+uint64_t CECTag::GetInt(void) const { 
+	switch (m_dataType) {
+		case EC_TAGTYPE_UINT8:
+			return PeekUInt8(m_tagData);
+		case EC_TAGTYPE_UINT16:
+			return ENDIAN_NTOHS( RawPeekUInt16( m_tagData ) );
+		case EC_TAGTYPE_UINT32:
+			return ENDIAN_NTOHL( RawPeekUInt32( m_tagData ) );
+		case EC_TAGTYPE_UINT64:
+			return ENDIAN_NTOHLL( RawPeekUInt64( m_tagData ) );
+		case EC_TAGTYPE_UNKNOWN:
+			// Empty tag - This is NOT an error.
+			return 0;
+		default:
+			assert(0);
+			return 0;
+	}
+}
+
 /*!
  * \fn CMD4Hash CECTag::GetMD4Data(void) const
  *
diff -ur amule-cvs-orig/src/libs/ec/cpp/ECTag.h amule-cvs/src/libs/ec/cpp/ECTag.h
--- amule-cvs-orig/src/libs/ec/cpp/ECTag.h	2007-05-31 14:37:23.000000000 +0100
+++ amule-cvs/src/libs/ec/cpp/ECTag.h	2007-05-30 12:56:54.000000000 +0100
@@ -129,24 +129,8 @@
 		uint32_t		GetTagLen(void) const;
 		ec_tagname_t	GetTagName(void) const { return m_tagName; }
 		// Retrieving special data types
-		uint64_t		GetInt(void) const { 
-			switch (m_dataType) {
-				case EC_TAGTYPE_UINT8:
-					return PeekUInt8(m_tagData);
-				case EC_TAGTYPE_UINT16:
-					return ENDIAN_NTOHS( RawPeekUInt16( m_tagData ) );
-				case EC_TAGTYPE_UINT32:
-					return ENDIAN_NTOHL( RawPeekUInt32( m_tagData ) );
-				case EC_TAGTYPE_UINT64:
-					return ENDIAN_NTOHLL( RawPeekUInt64( m_tagData ) );
-				case EC_TAGTYPE_UNKNOWN:
-					// Empty tag - This is NOT an error.
-					return 0;
-				default:
-					assert(0);
-					return 0;
-			}
-		}
+		uint64_t		GetInt(void) const;
+		
 		double		GetDoubleData(void) const;
 		std::string	GetStringDataSTL(void) const { 
 			assert((m_dataType == EC_TAGTYPE_STRING) || (m_dataType == EC_TAGTYPE_UNKNOWN));
diff -ur amule-cvs-orig/src/UploadBandwidthThrottler.cpp amule-cvs/src/UploadBandwidthThrottler.cpp
--- amule-cvs-orig/src/UploadBandwidthThrottler.cpp	2007-05-31 14:37:23.000000000 +0100
+++ amule-cvs/src/UploadBandwidthThrottler.cpp	2007-05-30 12:56:54.000000000 +0100
@@ -389,7 +389,7 @@
 				}
 	
 				if(socket != NULL) {
-					printf("Sending control data for socket %p\n",socket);
+					//printf("Sending control data for socket %p\n",socket);
 					SocketSentBytes socketSentBytes = socket->SendControlData(bytesToSpend-spentBytes, minFragSize);
 					uint32 lastSpentBytes = socketSentBytes.sentBytesControlPackets + socketSentBytes.sentBytesStandardPackets;
 					spentBytes += lastSpentBytes;
diff -ur amule-cvs-orig/src/webserver/src/WebInterface.cpp amule-cvs/src/webserver/src/WebInterface.cpp
--- amule-cvs-orig/src/webserver/src/WebInterface.cpp	2007-05-31 14:37:23.000000000 +0100
+++ amule-cvs/src/webserver/src/WebInterface.cpp	2007-05-30 12:56:54.000000000 +0100
@@ -153,7 +153,6 @@
 		return true;
 	}
 	
-#ifdef __WXGTK__
 	// Returns 'aMule' when we use 'amule' elsewhere
 	dir = wxStandardPaths::Get().GetDataDir();
 	dir = dir.BeforeLast(wxFileName::GetPathSeparator());
@@ -162,7 +161,6 @@
 		templateDir = dir;
 		return true;
 	}
-#endif
 
 	
 	// template not found. reverting to default
