diff options
author | fenner <fenner@FreeBSD.org> | 2001-10-15 00:38:32 +0800 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2001-10-15 00:38:32 +0800 |
commit | d6e5dde7e4ad95f4e2af63b337b45c28c71166cd (patch) | |
tree | efbabfe3875ccc3e4643c82731f5a13a70323749 /net-mgmt | |
parent | 78fecc610c3d64721d3bbeffa9d3daab5cbc896c (diff) | |
download | freebsd-ports-gnome-d6e5dde7e4ad95f4e2af63b337b45c28c71166cd.tar.gz freebsd-ports-gnome-d6e5dde7e4ad95f4e2af63b337b45c28c71166cd.tar.zst freebsd-ports-gnome-d6e5dde7e4ad95f4e2af63b337b45c28c71166cd.zip |
Handle mbuf statistics going away temporarily around
__FreeBSD_version 500021.
Leave a placeholder for reporting using the new method
added around __FreeBSD_version 500024.
(This fixes the build on -current.)
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/net-snmp-devel/files/patch-hr_storage.c | 39 | ||||
-rw-r--r-- | net-mgmt/net-snmp/files/patch-hr_storage.c | 39 | ||||
-rw-r--r-- | net-mgmt/net-snmp4/files/patch-hr_storage.c | 39 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-hr_storage.c | 39 |
4 files changed, 156 insertions, 0 deletions
diff --git a/net-mgmt/net-snmp-devel/files/patch-hr_storage.c b/net-mgmt/net-snmp-devel/files/patch-hr_storage.c new file mode 100644 index 000000000000..063c5bcc62ff --- /dev/null +++ b/net-mgmt/net-snmp-devel/files/patch-hr_storage.c @@ -0,0 +1,39 @@ +--- agent/mibgroup/host/hr_storage.c.orig Thu Mar 22 14:27:21 2001 ++++ agent/mibgroup/host/hr_storage.c Thu Oct 11 12:19:18 2001 +@@ -523,8 +523,18 @@ + for (i = 0; i < sizeof(mbstat.m_mtypes)/sizeof(mbstat.m_mtypes[0]); i++) + long_return += mbstat.m_mtypes[i]; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_mbufs; + #else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif ++#else + return NULL; + #endif + break; +@@ -562,7 +572,17 @@ + long_return = (mbpool.pr_nget - mbpool.pr_nput)*mbpool.pr_size + + (mclpool.pr_nget - mclpool.pr_nput)*mclpool.pr_size; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */ ++#else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif + #else + return NULL; + #endif diff --git a/net-mgmt/net-snmp/files/patch-hr_storage.c b/net-mgmt/net-snmp/files/patch-hr_storage.c new file mode 100644 index 000000000000..063c5bcc62ff --- /dev/null +++ b/net-mgmt/net-snmp/files/patch-hr_storage.c @@ -0,0 +1,39 @@ +--- agent/mibgroup/host/hr_storage.c.orig Thu Mar 22 14:27:21 2001 ++++ agent/mibgroup/host/hr_storage.c Thu Oct 11 12:19:18 2001 +@@ -523,8 +523,18 @@ + for (i = 0; i < sizeof(mbstat.m_mtypes)/sizeof(mbstat.m_mtypes[0]); i++) + long_return += mbstat.m_mtypes[i]; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_mbufs; + #else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif ++#else + return NULL; + #endif + break; +@@ -562,7 +572,17 @@ + long_return = (mbpool.pr_nget - mbpool.pr_nput)*mbpool.pr_size + + (mclpool.pr_nget - mclpool.pr_nput)*mclpool.pr_size; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */ ++#else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif + #else + return NULL; + #endif diff --git a/net-mgmt/net-snmp4/files/patch-hr_storage.c b/net-mgmt/net-snmp4/files/patch-hr_storage.c new file mode 100644 index 000000000000..063c5bcc62ff --- /dev/null +++ b/net-mgmt/net-snmp4/files/patch-hr_storage.c @@ -0,0 +1,39 @@ +--- agent/mibgroup/host/hr_storage.c.orig Thu Mar 22 14:27:21 2001 ++++ agent/mibgroup/host/hr_storage.c Thu Oct 11 12:19:18 2001 +@@ -523,8 +523,18 @@ + for (i = 0; i < sizeof(mbstat.m_mtypes)/sizeof(mbstat.m_mtypes[0]); i++) + long_return += mbstat.m_mtypes[i]; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_mbufs; + #else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif ++#else + return NULL; + #endif + break; +@@ -562,7 +572,17 @@ + long_return = (mbpool.pr_nget - mbpool.pr_nput)*mbpool.pr_size + + (mclpool.pr_nget - mclpool.pr_nput)*mclpool.pr_size; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */ ++#else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif + #else + return NULL; + #endif diff --git a/net-mgmt/net-snmp53/files/patch-hr_storage.c b/net-mgmt/net-snmp53/files/patch-hr_storage.c new file mode 100644 index 000000000000..063c5bcc62ff --- /dev/null +++ b/net-mgmt/net-snmp53/files/patch-hr_storage.c @@ -0,0 +1,39 @@ +--- agent/mibgroup/host/hr_storage.c.orig Thu Mar 22 14:27:21 2001 ++++ agent/mibgroup/host/hr_storage.c Thu Oct 11 12:19:18 2001 +@@ -523,8 +523,18 @@ + for (i = 0; i < sizeof(mbstat.m_mtypes)/sizeof(mbstat.m_mtypes[0]); i++) + long_return += mbstat.m_mtypes[i]; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_mbufs; + #else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif ++#else + return NULL; + #endif + break; +@@ -562,7 +572,17 @@ + long_return = (mbpool.pr_nget - mbpool.pr_nput)*mbpool.pr_size + + (mclpool.pr_nget - mclpool.pr_nput)*mclpool.pr_size; + #elif defined(MBSTAT_SYMBOL) ++#if __FreeBSD_version < 500021 + long_return = mbstat.m_clusters - mbstat.m_clfree; /* unlikely, but... */ ++#else ++#if __FreeBSD_version < 500024 ++ /* mbuf stats disabled */ ++ return NULL; ++#else ++ /* XXX TODO: implement new method */ ++ return NULL; ++#endif ++#endif + #else + return NULL; + #endif |