diff --git a/node/InetAddress.cpp b/node/InetAddress.cpp index 3eb5579f8..54daa668e 100644 --- a/node/InetAddress.cpp +++ b/node/InetAddress.cpp @@ -142,11 +142,19 @@ char *InetAddress::toIpString(char buf[64]) const buf[0] = (char)0; switch(ss_family) { case AF_INET: { +#ifdef _WIN32 + inet_ntop(AF_INET, (void*)&reinterpret_cast(this)->sin_addr.s_addr, buf, INET_ADDRSTRLEN); +#else inet_ntop(AF_INET, &reinterpret_cast(this)->sin_addr.s_addr, buf, INET_ADDRSTRLEN); +#endif } break; case AF_INET6: { +#ifdef _WIN32 + inet_ntop(AF_INET6, (void*)reinterpret_cast(this)->sin6_addr.s6_addr, buf, INET6_ADDRSTRLEN); +#else inet_ntop(AF_INET6, reinterpret_cast(this)->sin6_addr.s6_addr, buf, INET6_ADDRSTRLEN); +#endif } break; } return buf; diff --git a/service/OneService.cpp b/service/OneService.cpp index 91d10d226..9d3a95993 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -67,7 +67,7 @@ #include #include #include -#include +//#include #define stat _stat #else #include