From 13751fe221ea28a95b4ee1921a1ccba1f06c71fb Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 1 Jul 2006 19:11:54 +0000 Subject: [PATCH] all platforms use sigar.c:sigar_net_connection_list_get expect linux --- src/os/aix/sigar_os.h | 2 -- src/os/darwin/sigar_os.h | 2 -- src/os/hpux/sigar_os.h | 2 -- src/os/solaris/sigar_os.h | 2 -- src/sigar.c | 4 ++-- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/os/aix/sigar_os.h b/src/os/aix/sigar_os.h index b6b8cf79..294997ad 100644 --- a/src/os/aix/sigar_os.h +++ b/src/os/aix/sigar_os.h @@ -81,6 +81,4 @@ struct sigar_t { #define SIGAR_EPERM_KMEM (SIGAR_OS_START_ERROR+1) -#define SIGAR_USE_NET_CONNECTION_LIST_WALKER - #endif /* SIGAR_OS_H */ diff --git a/src/os/darwin/sigar_os.h b/src/os/darwin/sigar_os.h index b68a4478..61ed2e15 100644 --- a/src/os/darwin/sigar_os.h +++ b/src/os/darwin/sigar_os.h @@ -35,6 +35,4 @@ struct sigar_t { #define SIGAR_EPERM_KMEM (SIGAR_OS_START_ERROR+EACCES) #define SIGAR_EPROC_NOENT (SIGAR_OS_START_ERROR+2) -#define SIGAR_USE_NET_CONNECTION_LIST_WALKER - #endif /* SIGAR_OS_H */ diff --git a/src/os/hpux/sigar_os.h b/src/os/hpux/sigar_os.h index 457c2a75..4b678ebf 100644 --- a/src/os/hpux/sigar_os.h +++ b/src/os/hpux/sigar_os.h @@ -19,6 +19,4 @@ struct sigar_t { int hpux_get_mib_ifentry(int ppa, mib_ifEntry *mib); -#define SIGAR_USE_NET_CONNECTION_LIST_WALKER - #endif /* SIGAR_OS_H */ diff --git a/src/os/solaris/sigar_os.h b/src/os/solaris/sigar_os.h index 9f75044a..480a0fe4 100644 --- a/src/os/solaris/sigar_os.h +++ b/src/os/solaris/sigar_os.h @@ -279,7 +279,5 @@ struct sigar_t { #define SIGAR_EMIB2 (SIGAR_OS_START_ERROR+1) -#define SIGAR_USE_NET_CONNECTION_LIST_WALKER - #endif /* SIGAR_OS_H */ diff --git a/src/sigar.c b/src/sigar.c index 14b84ba4..c09150c8 100644 --- a/src/sigar.c +++ b/src/sigar.c @@ -719,10 +719,10 @@ SIGAR_DECLARE(const char *)sigar_net_connection_state_get(int state) } } -#ifdef SIGAR_USE_NET_CONNECTION_LIST_WALKER +#if !defined(__linux__) /* * implement sigar_net_connection_list_get using sigar_net_connection_walk - * linux has its own list_get impl. other platforms still need walker impl + * linux has its own list_get impl. */ static int net_connection_list_walker(sigar_net_connection_walker_t *walker, sigar_net_connection_t *conn)