diff options
author | Holger Weiss <hweiss@users.sourceforge.net> | 2007-01-23 14:39:09 +0000 |
---|---|---|
committer | Holger Weiss <hweiss@users.sourceforge.net> | 2007-01-23 14:39:09 +0000 |
commit | 63028dedabed52b4ef3f12b1fc8b2878c3088145 (patch) | |
tree | 0da54d6ab81e87878d1ecdc07f247b8dd7076ef2 /lib/mountlist.c | |
parent | 7c11e0873c3c4e67671494911f6e59636931d729 (diff) | |
download | monitoring-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/mountlist.c')
-rw-r--r-- | lib/mountlist.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/mountlist.c b/lib/mountlist.c index 70d4edb2..a1dca0aa 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -101,6 +101,11 @@ char *strstr (); # include <sys/statfs.h> #endif +#ifdef STAT_STATVFS +# include <sys/statvfs.h> +# define statfs statvfs +#endif + #ifdef MOUNTED_LISTMNTENT # include <mntent.h> #endif @@ -162,7 +167,7 @@ char *strstr (); #if MOUNTED_GETMNTINFO -# if ! HAVE_F_FSTYPENAME_IN_STATFS +# if ! HAVE_F_FSTYPENAME_IN_STATFS && ! STAT_STATVFS static char * fstype_to_string (short int t) { @@ -262,7 +267,7 @@ fstype_to_string (short int t) static char * fsp_to_string (const struct statfs *fsp) { -# if defined HAVE_F_FSTYPENAME_IN_STATFS +# if defined HAVE_F_FSTYPENAME_IN_STATFS || defined STAT_STATVFS return (char *) (fsp->f_fstypename); # else return fstype_to_string (fsp->f_type); |