summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp4/files/patch-hr_storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/net-snmp4/files/patch-hr_storage.c')
-rw-r--r--net-mgmt/net-snmp4/files/patch-hr_storage.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net-mgmt/net-snmp4/files/patch-hr_storage.c b/net-mgmt/net-snmp4/files/patch-hr_storage.c
index c13901e23fcd..4fdc2029b954 100644
--- a/net-mgmt/net-snmp4/files/patch-hr_storage.c
+++ b/net-mgmt/net-snmp4/files/patch-hr_storage.c
@@ -1,6 +1,6 @@
---- agent/mibgroup/host/hr_storage.c.orig Thu Jul 4 09:00:11 2002
-+++ agent/mibgroup/host/hr_storage.c Thu Jun 24 16:47:34 2004
-@@ -32,7 +32,7 @@
+--- agent/mibgroup/host/hr_storage.c.orig 2006-06-20 09:29:35.000000000 +0000
++++ agent/mibgroup/host/hr_storage.c 2008-04-30 06:08:02.000000000 +0000
+@@ -39,7 +39,7 @@
#else
#if HAVE_VM_VM_H
#include <vm/vm.h>
@@ -9,16 +9,16 @@
#include <machine/types.h>
#endif
#if HAVE_SYS_VMMETER_H
-@@ -148,7 +148,7 @@
- #define HRFS_mount mnt_mountp
+@@ -162,7 +162,7 @@
#define HRFS_statfs statvfs
+ #define HRFS_mount f_mntonname
-#elif defined(HAVE_STATVFS)
+#elif defined(HAVE_STATVFS) && defined(HAVE_MNTENT)
extern struct mntent *HRFS_entry;
extern int fscount;
-@@ -553,7 +553,7 @@
+@@ -568,7 +568,7 @@
}
case HRSTORE_UNITS:
if ( store_idx < HRS_TYPE_FS_MAX )
@@ -27,10 +27,10 @@
long_return = stat_buf.f_frsize;
#else
long_return = stat_buf.f_bsize;
-@@ -634,7 +634,15 @@
+@@ -649,7 +649,15 @@
for (i = 0; i < sizeof(mbstat.m_mtypes)/sizeof(mbstat.m_mtypes[0]); i++)
long_return += mbstat.m_mtypes[i];
- #elif defined(MBSTAT_SYMBOL)
+ #elif defined(MBSTAT_SYMBOL) && defined(STRUCT_MBSTAT_HAS_M_MBUFS)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_mbufs;
+#elif __FreeBSD_version < 500024
@@ -43,10 +43,10 @@
#elif defined(NO_DUMMY_VALUES)
return NULL;
#else
-@@ -693,7 +701,15 @@
+@@ -708,7 +716,15 @@
+ (mclpool.pr_nget - mclpool.pr_nput)
* mclpool.pr_size;
- #elif defined(MBSTAT_SYMBOL)
+ #elif defined(MBSTAT_SYMBOL) && defined(STRUCT_MBSTAT_HAS_M_CLUSTERS)
+#if !defined(__FreeBSD__) || __FreeBSD_version < 500021
long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */
+#elif __FreeBSD_version < 500024
@@ -59,7 +59,7 @@
#elif defined(NO_DUMMY_VALUES)
return NULL;
#else
-@@ -723,7 +739,11 @@
+@@ -738,7 +754,11 @@
#if !defined(linux) && !defined(solaris2) && !defined(hpux10) && !defined(hpux11)
case HRS_TYPE_MBUF:
#if defined(MBSTAT_SYMBOL)