diff options
Diffstat (limited to 'net/nagios-plugin-mysql/patches/patch-ak')
-rw-r--r-- | net/nagios-plugin-mysql/patches/patch-ak | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/net/nagios-plugin-mysql/patches/patch-ak b/net/nagios-plugin-mysql/patches/patch-ak index c3b74c269cd..3d1509c55ba 100644 --- a/net/nagios-plugin-mysql/patches/patch-ak +++ b/net/nagios-plugin-mysql/patches/patch-ak @@ -1,8 +1,8 @@ -$NetBSD: patch-ak,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ +$NetBSD: patch-ak,v 1.3 2011/04/08 22:48:41 morr Exp $ ---- gl/mountlist.c.orig 2007-01-24 23:47:25.000000000 +0100 +--- gl/mountlist.c.orig 2010-07-27 20:47:15.000000000 +0000 +++ gl/mountlist.c -@@ -57,7 +57,11 @@ char *strstr (); +@@ -52,7 +52,11 @@ # if HAVE_STRUCT_FSSTAT_F_FSTYPENAME # define FS_TYPE(Ent) ((Ent).f_fstypename) # else @@ -15,7 +15,7 @@ $NetBSD: patch-ak,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ # endif #endif /* MOUNTED_GETFSSTAT */ -@@ -104,6 +108,10 @@ char *strstr (); +@@ -99,6 +103,10 @@ # include <sys/statfs.h> #endif @@ -26,7 +26,7 @@ $NetBSD: patch-ak,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ #ifdef MOUNTED_LISTMNTENT # include <mntent.h> #endif -@@ -178,7 +186,7 @@ char *strstr (); +@@ -169,7 +177,7 @@ #if MOUNTED_GETMNTINFO @@ -35,7 +35,7 @@ $NetBSD: patch-ak,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ static char * fstype_to_string (short int t) { -@@ -275,9 +283,13 @@ fstype_to_string (short int t) +@@ -266,9 +274,13 @@ fstype_to_string (short int t) # endif static char * @@ -50,19 +50,7 @@ $NetBSD: patch-ak,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ return (char *) (fsp->f_fstypename); # else return fstype_to_string (fsp->f_type); -@@ -413,7 +425,11 @@ read_file_system_list (bool need_fs_type - - #ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ - { -+#ifdef STAT_STATVFS -+ struct statvfs *fsp; -+#else - struct statfs *fsp; -+#endif - int entries; - - entries = getmntinfo (&fsp, MNT_NOWAIT); -@@ -601,9 +617,17 @@ read_file_system_list (bool need_fs_type +@@ -592,9 +604,17 @@ read_file_system_list (bool need_fs_type { int numsys, counter; size_t bufsize; @@ -80,22 +68,3 @@ $NetBSD: patch-ak,v 1.2 2008/05/27 21:22:02 tonnerre Exp $ if (numsys < 0) return (NULL); if (SIZE_MAX / sizeof *stats <= numsys) -@@ -666,10 +690,18 @@ read_file_system_list (bool need_fs_type - # ifdef GETFSTYP /* SVR3. */ - if (need_fs_type) - { -+#ifdef STAT_STATVFS -+ struct statvfs fsd; -+#else - struct statfs fsd; -+#endif - char typebuf[FSTYPSZ]; - -+#ifdef STAT_STATVFS -+ if (statvfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 -+#else - if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 -+#endif - && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) - { - me->me_type = xstrdup (typebuf); |