summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2008-01-03 19:10:09 +0000
committerseb <seb@pkgsrc.org>2008-01-03 19:10:09 +0000
commitb068169142d82d0be3f2ca04948dca15481a4fc1 (patch)
treedba5280807bbe16503785c9f07335b464d4bb7ef /net
parent806e7641d4023ecb3ec09da2428b741c29edffec (diff)
downloadpkgsrc-b068169142d82d0be3f2ca04948dca15481a4fc1.tar.gz
Fix floating point exception on NetBSD/sparc64 by applying the same
fix (and error checking) on agent/mibgroup/hardware/memory/memory_netbsd.c:netsnmp_mem_arch_load() via new patch file patch-ah as the one applied on agent/mibgroup/ucd-snmp/memory_netbsd1.c:var_extensible_mem() by patch file patch-es. Sorry I missed this in november 2006... Bump PKGREVISION to 1.
Diffstat (limited to 'net')
-rw-r--r--net/net-snmp/Makefile3
-rw-r--r--net/net-snmp/distinfo3
-rw-r--r--net/net-snmp/patches/patch-ah48
3 files changed, 52 insertions, 2 deletions
diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile
index ecc936f4266..2cc5d7c57b9 100644
--- a/net/net-snmp/Makefile
+++ b/net/net-snmp/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.66 2007/11/23 21:29:17 adrianp Exp $
+# $NetBSD: Makefile,v 1.67 2008/01/03 19:10:09 seb Exp $
DISTNAME= net-snmp-5.4.1
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/}
diff --git a/net/net-snmp/distinfo b/net/net-snmp/distinfo
index aa6ab477f80..36a8a8b615f 100644
--- a/net/net-snmp/distinfo
+++ b/net/net-snmp/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.41 2007/08/12 13:36:37 joerg Exp $
+$NetBSD: distinfo,v 1.42 2008/01/03 19:10:09 seb Exp $
SHA1 (net-snmp-5.4.1.tar.gz) = ac5ba033c10d53d3057415121f8c4936c643c208
RMD160 (net-snmp-5.4.1.tar.gz) = 3723488dab8d164702a7d55c9c72eeaec07dd50c
@@ -9,6 +9,7 @@ SHA1 (patch-ac) = acdcde40ec53215d7778b2d0a67656b82274d006
SHA1 (patch-ae) = 721e62bb42b6d3787f36316cf2628cd71ae6a6ce
SHA1 (patch-af) = 88d0433a6a233dc52fec10e29183d820c50bd524
SHA1 (patch-ag) = 7021f7238c37635c9c32ceca681fd42aa125437f
+SHA1 (patch-ah) = 9ad04b5c0046a82c4e601e4f3abb2dd491846489
SHA1 (patch-al) = 2609e273d557e1ce06c1295d86965fe26ac7ff08
SHA1 (patch-am) = 64461aef9b4409cd7ed4941e5d5441710a6035d8
SHA1 (patch-an) = 167f23c62c085efc96a25bc2be5dca3c746dde6f
diff --git a/net/net-snmp/patches/patch-ah b/net/net-snmp/patches/patch-ah
new file mode 100644
index 00000000000..39a991f5883
--- /dev/null
+++ b/net/net-snmp/patches/patch-ah
@@ -0,0 +1,48 @@
+$NetBSD: patch-ah,v 1.4 2008/01/03 19:10:10 seb Exp $
+
+--- agent/mibgroup/hardware/memory/memory_netbsd.c.orig 2006-03-06 16:23:52.000000000 +0000
++++ agent/mibgroup/hardware/memory/memory_netbsd.c
+@@ -4,6 +4,7 @@
+ #include <net-snmp/agent/hardware/memory.h>
+
+ #include <unistd.h>
++#include <errno.h>
+ #include <sys/sysctl.h>
+ #include <sys/swap.h>
+
+@@ -30,7 +31,7 @@ int netsnmp_mem_arch_load( netsnmp_cache
+ long pagesize;
+
+ struct uvmexp uvmexp;
+- int uvmexp_size = sizeof(uvmexp);
++ size_t uvmexp_size = sizeof(uvmexp);
+ int uvmexp_mib[] = { CTL_VM, VM_UVMEXP };
+
+ struct vmtotal total;
+@@ -46,10 +47,22 @@ int netsnmp_mem_arch_load( netsnmp_cache
+ /*
+ * Retrieve the memory information from the underlying O/S...
+ */
+- sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0);
+- sysctl(total_mib, 2, &total, &total_size, NULL, 0);
+- sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0);
+- sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0);
++ if (sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0) == -1) {
++ snmp_log(LOG_ERR, "sysctl VM_UVMEXP failed (errno %d)\n", errno);
++ return -1;
++ }
++ if (sysctl(total_mib, 2, &total, &total_size, NULL, 0) == -1) {
++ snmp_log(LOG_ERR, "sysctl VM_METER failed (errno %d)\n", errno);
++ return -1;
++ }
++ if (sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0) == -1) {
++ snmp_log(LOG_ERR, "sysctl HW_PHYSMEM failed (errno %d)\n", errno);
++ return -1;
++ }
++ if (sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0) == -1) {
++ snmp_log(LOG_ERR, "sysctl HW_USERMEM failed (errno %d)\n", errno);
++ return -1;
++ }
+ pagesize = uvmexp.pagesize;
+
+ /*