summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHolger Weiss <hweiss@users.sourceforge.net>2007-01-23 14:39:09 (GMT)
committerHolger Weiss <hweiss@users.sourceforge.net>2007-01-23 14:39:09 (GMT)
commit63028dedabed52b4ef3f12b1fc8b2878c3088145 (patch)
tree0da54d6ab81e87878d1ecdc07f247b8dd7076ef2 /lib
parent7c11e0873c3c4e67671494911f6e59636931d729 (diff)
downloadmonitoring-plugins-63028dedabed52b4ef3f12b1fc8b2878c3088145.tar.gz
Add support for statvfs(2) which is needed in order to compile the plugins on
NetBSD 3.0 and newer. The current coreutils release supports statvfs(2), so this patch won't be needed anymore when updating the coreutils files. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1575 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib')
-rw-r--r--lib/mountlist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 70d4edb..a1dca0a 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -101,6 +101,11 @@ char *strstr ();
101# include <sys/statfs.h> 101# include <sys/statfs.h>
102#endif 102#endif
103 103
104#ifdef STAT_STATVFS
105# include <sys/statvfs.h>
106# define statfs statvfs
107#endif
108
104#ifdef MOUNTED_LISTMNTENT 109#ifdef MOUNTED_LISTMNTENT
105# include <mntent.h> 110# include <mntent.h>
106#endif 111#endif
@@ -162,7 +167,7 @@ char *strstr ();
162 167
163#if MOUNTED_GETMNTINFO 168#if MOUNTED_GETMNTINFO
164 169
165# if ! HAVE_F_FSTYPENAME_IN_STATFS 170# if ! HAVE_F_FSTYPENAME_IN_STATFS && ! STAT_STATVFS
166static char * 171static char *
167fstype_to_string (short int t) 172fstype_to_string (short int t)
168{ 173{
@@ -262,7 +267,7 @@ fstype_to_string (short int t)
262static char * 267static char *
263fsp_to_string (const struct statfs *fsp) 268fsp_to_string (const struct statfs *fsp)
264{ 269{
265# if defined HAVE_F_FSTYPENAME_IN_STATFS 270# if defined HAVE_F_FSTYPENAME_IN_STATFS || defined STAT_STATVFS
266 return (char *) (fsp->f_fstypename); 271 return (char *) (fsp->f_fstypename);
267# else 272# else
268 return fstype_to_string (fsp->f_type); 273 return fstype_to_string (fsp->f_type);