diff options
author | df@pippilotta.erinye.com <> | 2008-02-13 14:44:56 +0100 |
---|---|---|
committer | df@pippilotta.erinye.com <> | 2008-02-13 14:44:56 +0100 |
commit | c78d61693883053c474b45de0d3f3899132e54b3 (patch) | |
tree | 00b7cdb20eaaeb8db93431d2c54657a9867d243f /extra | |
parent | 159bc5c73b258a4f240aa3155e9c82976bb6e48e (diff) | |
parent | 72073063cbb9bce96ba8a98d3011d8229393f96f (diff) | |
download | mariadb-git-c78d61693883053c474b45de0d3f3899132e54b3.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
Diffstat (limited to 'extra')
-rw-r--r-- | extra/resolveip.c | 8 |
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"); |