#include <sys/socket.h>
#endif*/
+#ifdef FREE_BSD
+#include <sys/types.h>
+#endif
+
+#ifdef WIN32
+#include <winsock2.h>
+#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#endif
+
#include <iconv.h>
#include <cstdlib>
}
struct in_addr in;
- if (!inet_aton(p1, &in))
+ if (inet_pton(AF_INET, p1, &in) != 1)
{
//printf("INADDR_NONE\n");
return EINVAL;