I have exactly the same problem here and I don't know what is going on.
Compiling TextClient.cpp
In file included from ./libs/ec/ECPacket.h:28,
from ./libs/ec/RemoteConnect.h:31,
from ExternalConnector.h:39,
from TextClient.h:29,
from TextClient.cpp:35:
./libs/ec/ECTag.h:34:2: warning: #warning Kry - Can you say "Design flaw"?
In file included from TextClient.cpp:42:
./libs/ec/ECSpecialTags.h:28:2: warning: #warning Kry - Preferences packet derived from packet, and that's ok, but shouldn't be here because this is a tag file and forces a stupid include
/usr/include/unistd.h:201: error: multiple types in one declaration
/usr/include/unistd.h:201: error: declaration does not declare anything
/usr/include/unistd.h:206: error: multiple types in one declaration
/usr/include/unistd.h:206: error: declaration does not declare anything
/usr/include/unistd.h:229: error: multiple types in one declaration
/usr/include/unistd.h:229: error: declaration does not declare anything
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: '::malloc' has not been declared
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: '::realloc' has not been declared
/usr/include/stdint.h:141: error: declaration does not declare anything
/usr/local/wxWidgets-cvsu/include/wx-2.7/wx/vector.h: In member function 'bool wxVectorBase::Alloc(size_t)':
/usr/local/wxWidgets-cvsu/include/wx-2.7/wx/vector.h:35: error: 'realloc' was not declared in this scope
make[3]: *** [amulecmd-TextClient.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2