summaryrefslogtreecommitdiff
path: root/net/net-snmp/patches
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2004-04-26 17:39:00 +0000
committertron <tron@pkgsrc.org>2004-04-26 17:39:00 +0000
commit6f8880c048023e0a163f85686b3630b4e23ccecf (patch)
tree47cb5abcddc50740b6832b72d6f63610e0e09480 /net/net-snmp/patches
parent42852ea44c2b4e85e6bd54bc9b9bb10bda00f4d9 (diff)
downloadpkgsrc-6f8880c048023e0a163f85686b3630b4e23ccecf.tar.gz
Make this build under NetBSD 2.0D and above with statvfs(2).
Diffstat (limited to 'net/net-snmp/patches')
-rw-r--r--net/net-snmp/patches/patch-ag18
-rw-r--r--net/net-snmp/patches/patch-ah31
2 files changed, 49 insertions, 0 deletions
diff --git a/net/net-snmp/patches/patch-ag b/net/net-snmp/patches/patch-ag
new file mode 100644
index 00000000000..ea48665aab2
--- /dev/null
+++ b/net/net-snmp/patches/patch-ag
@@ -0,0 +1,18 @@
+$NetBSD: patch-ag,v 1.1 2004/04/26 17:39:00 tron Exp $
+
+--- agent/mibgroup/host/hr_storage.c.orig 2002-12-19 16:07:30.000000000 +0100
++++ agent/mibgroup/host/hr_storage.c 2004-04-26 19:10:23.000000000 +0200
+@@ -148,6 +148,13 @@
+ #define HRFS_mount mnt_mountp
+ #define HRFS_statfs statvfs
+
++#elif defined(HAVE_STATVFS) && defined(__NetBSD__)
++
++extern struct statvfs *HRFS_entry;
++extern int fscount;
++#define HRFS_statfs statvfs
++#define HRFS_mount f_mntonname
++
+ #elif defined(HAVE_STATVFS)
+
+ extern struct mntent *HRFS_entry;
diff --git a/net/net-snmp/patches/patch-ah b/net/net-snmp/patches/patch-ah
new file mode 100644
index 00000000000..3ab558716ed
--- /dev/null
+++ b/net/net-snmp/patches/patch-ah
@@ -0,0 +1,31 @@
+$NetBSD: patch-ah,v 1.1 2004/04/26 17:39:00 tron Exp $
+
+--- agent/mibgroup/host/hr_filesys.c.orig 2003-02-28 19:17:35.000000000 +0100
++++ agent/mibgroup/host/hr_filesys.c 2004-04-26 19:31:03.000000000 +0200
+@@ -85,6 +85,15 @@
+ #define HRFS_type mnt_fstype
+ #define HRFS_statfs statvfs
+
++#elif defined(HAVE_STATVFS) && defined(__NetBSD__)
++
++static struct statvfs *fsstats = NULL;
++struct statvfs *HRFS_entry;
++static int fscount;
++#define HRFS_mount f_mntonname
++#define HRFS_name f_mntfromname
++#define HRFS_statfs statvfs
++#define HRFS_type f_fstypename
+ #elif defined(HAVE_GETFSSTAT)
+ static struct statfs *fsstats = 0;
+ static int fscount;
+@@ -447,7 +456,9 @@
+ return (u_char *) fsys_type_id;
+
+ case HRFSYS_ACCESS:
+-#if HAVE_GETFSSTAT
++#if defined(HAVE_STATVFS) && defined(__NetBSD__)
++ long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1;
++#elif defined(HAVE_GETFSSTAT)
+ long_return = HRFS_entry->f_flags & MNT_RDONLY ? 2 : 1;
+ #elif defined(cygwin)
+ long_return = 1;