Fixed linking of RetroShare.

undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, sockaddr_in const&)'

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3358 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-08-11 20:14:29 +00:00
parent 2b3fb8e988
commit e046ebd480

View File

@ -142,16 +142,12 @@ bool getIPAddressFromString (const char *addr_str, struct in_addr *addr)
return false;
}
#ifndef RS_USE_BITDHT
// This function is also defined in the bitdht library. I added this to remove the compilation error due to
// duplicate definitions.
std::ostream &operator<<(std::ostream &out, const struct sockaddr_in &addr)
{
out << "[" << inet_ntoa(addr.sin_addr) << ":";
out << htons(addr.sin_port) << "]";
return out;
}
#endif
/* thread-safe version of inet_ntoa */