From ba22cc0531fb74389618c9d87e53bf408fad7000 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Jul 2009 10:31:14 -0700 Subject: [PATCH] net_interface ipv6 support requires msvc7 or higher --- src/os/win32/win32_sigar.c | 4 ++++ src/sigar_format.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index 5eaeb274..c511924b 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -2640,6 +2640,9 @@ sigar_net_interface_list_get(sigar_t *sigar, static int sigar_net_interface_ipv6_config_find(sigar_t *sigar, int index, sigar_net_interface_config_t *ifconfig) { +#ifdef SIGAR_USING_MSC6 + return SIGAR_ENOTIMPL; +#else int status; PIP_ADAPTER_ADDRESSES aa, addrs; ULONG flags = GAA_FLAG_INCLUDE_PREFIX; @@ -2671,6 +2674,7 @@ static int sigar_net_interface_ipv6_config_find(sigar_t *sigar, int index, } } return SIGAR_ENOENT; +#endif } SIGAR_DECLARE(int) diff --git a/src/sigar_format.c b/src/sigar_format.c index d77d8772..b44c3a7f 100644 --- a/src/sigar_format.c +++ b/src/sigar_format.c @@ -353,7 +353,10 @@ SIGAR_DECLARE(int) sigar_net_address_equals(sigar_net_address_t *addr1, } } -#if defined(WIN32) +#if defined(SIGAR_USING_MSC6) +#define sigar_inet_ntop(af, src, dst, size) NULL +#define sigar_inet_ntop_errno SIGAR_ENOTIMPL +#elif defined(WIN32) static char *sigar_inet_ntop(int af, const void *src, char *dst, int cnt) { struct sockaddr_in6 sa; /* note only using this for AF_INET6 */