pkgsrc/net/net-snmp/patches/patch-ah
adam 2cb098d8f0 Changes 5.1.1:
New:
  - test suite supports testing over other transports (tcp, udp6, unix, ...)
    (see the -P switch to the testing/RUNTESTS script)
  - Solaris supports the use of it's PKCS#11 library for supporting
    cryptographic functions (OpenSSL isn't required if PKCS#11 is available)
    (see configure's --with-pkcs flag)
Fixes:
  - Improvements on 64 bit architectures.
  - A few minor memory leaks fixed.
  - An extremely large number of minor bug fixes.
  - Many perl module specific bug fixes.
  - snmpd will safely handle more signals.
Ports:
  - Many many significant Windows improvements.
    - A win32 build script in win32/build.pl
    - Support for the MinGW compiler
    - (see the README.win32 file for details on new ports)
    - Various helpful win32/*.bat files for installation, etc.
  - Some linux 2.6 support improvements
2004-05-14 13:30:34 +00:00

31 lines
1 KiB
Text

$NetBSD: patch-ah,v 1.2 2004/05/14 13:30:34 adam Exp $
--- agent/mibgroup/host/hr_filesys.c.orig 2004-01-29 13:53:59.000000000 +0000
+++ agent/mibgroup/host/hr_filesys.c
@@ -86,6 +86,15 @@ struct mnttab *HRFS_entry = &HRFS_entry
#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;
@@ -452,7 +461,9 @@ var_hrfilesys(struct variable *vp,
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;