mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
suppressed double definition of operator<<() when using libbitdht
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3343 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4bb4fc11e2
commit
09d5014df5
@ -142,13 +142,16 @@ bool getIPAddressFromString (const char *addr_str, struct in_addr *addr)
|
|||||||
return false;
|
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)
|
std::ostream &operator<<(std::ostream &out, const struct sockaddr_in &addr)
|
||||||
{
|
{
|
||||||
out << "[" << inet_ntoa(addr.sin_addr) << ":";
|
out << "[" << inet_ntoa(addr.sin_addr) << ":";
|
||||||
out << htons(addr.sin_port) << "]";
|
out << htons(addr.sin_port) << "]";
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* thread-safe version of inet_ntoa */
|
/* thread-safe version of inet_ntoa */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user