From 00c74e940d10ac2b5e3fa18c965ec68e2d938650 Mon Sep 17 00:00:00 2001 From: Robert Lunnon Date: Wed, 9 Jul 2003 21:55:09 +0000 Subject: [PATCH] Fixed some compile problems under Solaris. --- dlls/iphlpapi/ifenum.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c index d7d8ab8dd58..04698fd6e4a 100644 --- a/dlls/iphlpapi/ifenum.c +++ b/dlls/iphlpapi/ifenum.c @@ -630,6 +630,7 @@ DWORD getInterfacePhysicalByName(const char *name, PDWORD len, PBYTE addr, *type = MIB_IF_TYPE_LOOPBACK; memset(addr, 0, *len); *len = 0; + ret=NOERROR; } else { struct arpreq arp; @@ -639,7 +640,7 @@ DWORD getInterfacePhysicalByName(const char *name, PDWORD len, PBYTE addr, arp.arp_pa.sa_family = AF_INET; saddr = (struct sockaddr_in *)&arp; /* proto addr is first member */ saddr->sin_family = AF_INET; - saddr->sin_addr.s_addr = getInterfaceAddrByName(name); + saddr->sin_addr.s_addr = getInterfaceIPAddrByName(name); if ((ioctl(fd, SIOCGARP, &arp))) ret = ERROR_INVALID_DATA; else { @@ -661,9 +662,11 @@ DWORD getInterfacePhysicalByName(const char *name, PDWORD len, PBYTE addr, } } } + close(fd); + } else ret = ERROR_NO_MORE_FILES; - } + return ret; } #elif defined (HAVE_SYS_SYSCTL_H) && defined (HAVE_NET_IF_DL_H)