mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Handle broken inet_ntop on old Windows SDKs.
This commit is contained in:
parent
ea9475dfdf
commit
9455c92712
@ -566,8 +566,10 @@ IpAddress::~IpAddress()
|
|||||||
|
|
||||||
void IpAddress::Set( const struct sockaddr& addr )
|
void IpAddress::Set( const struct sockaddr& addr )
|
||||||
{
|
{
|
||||||
#if __MINGW32__
|
#if defined _WIN32 && ( !defined NTDDI_WIN10 || NTDDI_VERSION < NTDDI_WIN10 )
|
||||||
auto ai = (struct sockaddr_in*)&addr;
|
struct sockaddr_in tmp;
|
||||||
|
memcpy( &tmp, &addr, sizeof( tmp ) );
|
||||||
|
auto ai = &tmp;
|
||||||
#else
|
#else
|
||||||
auto ai = (const struct sockaddr_in*)&addr;
|
auto ai = (const struct sockaddr_in*)&addr;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user