summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <df@pippilotta.erinye.com>2008-02-13 14:44:56 +0100
committerunknown <df@pippilotta.erinye.com>2008-02-13 14:44:56 +0100
commite08c867e73fdc262fbf8d67dc1bf54f066833894 (patch)
tree00b7cdb20eaaeb8db93431d2c54657a9867d243f /extra
parent6262c056fa8cff69073d3f9f58692d64ec4d2b60 (diff)
parent98964759359592557007e44b10ebc7d799a64790 (diff)
downloadmariadb-git-e08c867e73fdc262fbf8d67dc1bf54f066833894.tar.gz
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build extra/resolveip.c: Auto merged
Diffstat (limited to 'extra')
-rw-r--r--extra/resolveip.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/extra/resolveip.c b/extra/resolveip.c
index 9f936fa60b4..5f2a9269f62 100644
--- a/extra/resolveip.c
+++ b/extra/resolveip.c
@@ -118,13 +118,21 @@ int main(int argc, char **argv)
while (argc--)
{
+#ifndef WIN32
struct in_addr addr;
+#endif
ip = *argv++;
/* Not compatible with IPv6! Probably should use getnameinfo(). */
+#ifdef WIN32
+ taddr = inet_addr(ip);
+ if(taddr != INADDR_NONE)
+ {
+#else
if (inet_aton(ip, &addr) != 0)
{
taddr= addr.s_addr;
+#endif
if (taddr == htonl(INADDR_BROADCAST))
{
puts("Broadcast");