mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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
This commit is contained in:
commit
e08c867e73
1 changed files with 8 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue