summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c11e08)
raw | patch | inline | side by side (parent: 7c11e08)
author | Holger Weiss <hweiss@users.sourceforge.net> | |
Tue, 23 Jan 2007 14:39:09 +0000 (14:39 +0000) | ||
committer | Holger Weiss <hweiss@users.sourceforge.net> | |
Tue, 23 Jan 2007 14:39:09 +0000 (14:39 +0000) |
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
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
lib/mountlist.c | patch | blob | history |
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 70d4edb2d9174c3dced7cfe69bc2028472ad5f10..a1dca0aaacf13223cca1a15512095a30360e7315 100644 (file)
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
# include <sys/statfs.h>
#endif
+#ifdef STAT_STATVFS
+# include <sys/statvfs.h>
+# define statfs statvfs
+#endif
+
#ifdef MOUNTED_LISTMNTENT
# include <mntent.h>
#endif
#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)
{
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);