@@ -123,7 +123,7 @@ std::string InetAddress::toIpPortNetEndian() const
123
123
std::string buf;
124
124
static constexpr auto bytes = sizeof (addr_.sin_port );
125
125
buf.resize (bytes);
126
- #if defined _MSC_VER && _MSC_VER >= 1900
126
+ #if defined _WIN32
127
127
std::memcpy ((PVOID)&buf[0 ], (PVOID)&addr_.sin_port , bytes);
128
128
#else
129
129
std::memcpy (&buf[0 ], &addr_.sin_port , bytes);
@@ -201,15 +201,15 @@ std::string InetAddress::toIp() const
201
201
char buf[64 ];
202
202
if (addr_.sin_family == AF_INET)
203
203
{
204
- #if defined _MSC_VER && _MSC_VER >= 1900
204
+ #if defined _WIN32
205
205
::inet_ntop (AF_INET, (PVOID)&addr_.sin_addr, buf, sizeof(buf));
206
206
#else
207
207
::inet_ntop (AF_INET, &addr_.sin_addr, buf, sizeof (buf));
208
208
#endif
209
209
}
210
210
else if (addr_.sin_family == AF_INET6)
211
211
{
212
- #if defined _MSC_VER && _MSC_VER >= 1900
212
+ #if defined _WIN32
213
213
::inet_ntop (AF_INET6, (PVOID)&addr6_.sin6_addr, buf, sizeof(buf));
214
214
#else
215
215
::inet_ntop (AF_INET6, &addr6_.sin6_addr, buf, sizeof (buf));
@@ -226,7 +226,7 @@ std::string InetAddress::toIpNetEndian() const
226
226
{
227
227
static constexpr auto bytes = sizeof (addr_.sin_addr .s_addr );
228
228
buf.resize (bytes);
229
- #if defined _MSC_VER && _MSC_VER >= 1900
229
+ #if defined _WIN32
230
230
std::memcpy ((PVOID)&buf[0 ], (PVOID)&addr_.sin_addr .s_addr , bytes);
231
231
#else
232
232
std::memcpy (&buf[0 ], &addr_.sin_addr .s_addr , bytes);
@@ -236,7 +236,7 @@ std::string InetAddress::toIpNetEndian() const
236
236
{
237
237
static constexpr auto bytes = sizeof (addr6_.sin6_addr );
238
238
buf.resize (bytes);
239
- #if defined _MSC_VER && _MSC_VER >= 1900
239
+ #if defined _WIN32
240
240
std::memcpy ((PVOID)&buf[0 ], (PVOID)ip6NetEndian (), bytes);
241
241
#else
242
242
std::memcpy (&buf[0 ], ip6NetEndian (), bytes);
0 commit comments