Skip to content

Commit 714e3b5

Browse files
authored
Add support of VS2019 (#110)
1 parent e3aef2d commit 714e3b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

trantor/net/InetAddress.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ std::string InetAddress::toIp() const
188188
char buf[64];
189189
if (addr_.sin_family == AF_INET)
190190
{
191-
#if defined _MSC_VER && _MSC_VER == 1900
191+
#if defined _MSC_VER && _MSC_VER >= 1900
192192
::inet_ntop(AF_INET, (PVOID)&addr_.sin_addr, buf, sizeof(buf));
193193
#else
194194
::inet_ntop(AF_INET, &addr_.sin_addr, buf, sizeof(buf));
195195
#endif
196196
}
197197
else if (addr_.sin_family == AF_INET6)
198198
{
199-
#if defined _MSC_VER && _MSC_VER == 1900
199+
#if defined _MSC_VER && _MSC_VER >= 1900
200200
::inet_ntop(AF_INET6, (PVOID)&addr6_.sin6_addr, buf, sizeof(buf));
201201
#else
202202
::inet_ntop(AF_INET6, &addr6_.sin6_addr, buf, sizeof(buf));

0 commit comments

Comments
 (0)