diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2008-04-28 22:54:28 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2008-04-28 22:54:28 +0000 |
commit | 7ce7d2ea632588ad78e789b5d30d894b254c3bd8 (patch) | |
tree | 750691f58ced2f245b99247f90f021fbec228a94 /net-mgmt/net-snmp53 | |
parent | 7c573e7caa6c24f54428a2e2e7b0aa015bd69902 (diff) | |
download | ports-7ce7d2ea632588ad78e789b5d30d894b254c3bd8.tar.gz ports-7ce7d2ea632588ad78e789b5d30d894b254c3bd8.zip |
Notes
Diffstat (limited to 'net-mgmt/net-snmp53')
-rw-r--r-- | net-mgmt/net-snmp53/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/net-mgmt/net-snmp53/Makefile b/net-mgmt/net-snmp53/Makefile index 128127efba3b..22122a608796 100644 --- a/net-mgmt/net-snmp53/Makefile +++ b/net-mgmt/net-snmp53/Makefile @@ -7,7 +7,7 @@ PORTNAME= snmp PORTVERSION= 5.3.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net-mgmt ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= net-snmp diff --git a/net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c b/net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c new file mode 100644 index 000000000000..310c0bbf5320 --- /dev/null +++ b/net-mgmt/net-snmp53/files/patch-vmstat_freebsd2.c @@ -0,0 +1,22 @@ +--- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig 2008-04-25 16:28:53.000000000 +0300 ++++ agent/mibgroup/ucd-snmp/vmstat_freebsd2.c 2008-04-25 16:29:01.000000000 +0300 +@@ -174,6 +174,7 @@ + static long cpu_total; + long cpu_sum; + double cpu_prc; ++ int mib[2], mib_len, cpu_new_len; + + static struct vmmeter mem_old, mem_new; + +@@ -195,7 +196,10 @@ + /* + * CPU usage + */ +- auto_nlist(CPTIME_SYMBOL, (char *) cpu_new, sizeof(cpu_new)); ++ mib_len = 2; ++ sysctlnametomib("kern.cp_time", mib, &mib_len); ++ cpu_new_len = sizeof(cpu_new); ++ sysctl(mib, mib_len, cpu_new, &cpu_new_len, NULL, 0); + + cpu_total = 0; + |