X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/56ffdca636bfde338300a1ef6e0114ae1fc0373b..327ec384624ea69aa0e02f89d5513e31752fef90:/stglibs/common.lib/common.cpp?ds=sidebyside diff --git a/stglibs/common.lib/common.cpp b/stglibs/common.lib/common.cpp index 3ad1eb5a..57b37bdf 100644 --- a/stglibs/common.lib/common.cpp +++ b/stglibs/common.lib/common.cpp @@ -58,9 +58,14 @@ #include #endif +#ifdef WIN32 +#include +#else #include #include #include +#endif + #include #include @@ -410,7 +415,7 @@ for (int i = 0; i < maxIP; i++) } struct in_addr in; - if (!inet_aton(p1, &in)) + if (inet_pton(AF_INET, p1, &in) != 1) { //printf("INADDR_NONE\n"); return EINVAL;