mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
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:
parent
2b3fb8e988
commit
e046ebd480
@ -142,16 +142,12 @@ 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