mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 00:12:33 +00:00
Fix struct sockaddr.
This was SVN commit r5408.
This commit is contained in:
@@ -126,7 +126,8 @@ PS_RESULT CSocketAddress::Resolve(const char *name, int port, CSocketAddress &ad
|
||||
CStr CSocketAddress::GetString() const
|
||||
{
|
||||
char convBuf[NI_MAXHOST];
|
||||
int res=getnameinfo((sockaddr *)&m_Union, sizeof(sockaddr), convBuf, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
|
||||
int res=getnameinfo((struct sockaddr *)&m_Union, sizeof(struct sockaddr),
|
||||
convBuf, NI_MAXHOST, NULL, 0, NI_NUMERICHOST);
|
||||
if (res == 0)
|
||||
return CStr(convBuf);
|
||||
// getnameinfo won't return a string for the IPv6 unspecified address
|
||||
|
||||
Reference in New Issue
Block a user