diff --git a/src/df.c b/src/df.c
index eda9f959e5f26982a8b41e4199eee8f5da029442..6b7df3112a92b27ecbcaa401eb4663a39ba8f539 100644 (file)
--- a/src/df.c
+++ b/src/df.c
# define DF_HAVE_READ 0
#endif
# define DF_HAVE_READ 0
#endif
-#if HAVE_STATFS
-#define STATANYFS statfs
-#define BLOCKSIZE(s) (s).f_bsize
-
-#elif HAVE_STATVFS
-#define STATANYFS statvfs
-#define BLOCKSIZE(s) ((s).f_frsize ? (s).f_frsize : (s).f_bsize)
+#if HAVE_STATVFS
+# if HAVE_SYS_STATVFS_H
+# include <sys/statvfs.h>
+# endif
+# define STATANYFS statvfs
+# define BLOCKSIZE(s) ((s).f_frsize ? (s).f_frsize : (s).f_bsize)
+#elif HAVE_STATFS
+# if HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
+# endif
+# define STATANYFS statfs
+# define BLOCKSIZE(s) (s).f_bsize
#endif
static char *filename_template = "df-%s.rrd";
#endif
static char *filename_template = "df-%s.rrd";
-/* 104857600 == 100 MB */
static char *ds_def[] =
{
"DS:used:GAUGE:25:0:U",
static char *ds_def[] =
{
"DS:used:GAUGE:25:0:U",
static void df_read (void)
{
static void df_read (void)
{
- struct STATANYFS statbuf;
+#if HAVE_STATVFS
+ struct statvfs statbuf;
+#elif HAVE_STATFS
+ struct statfs statbuf;
+#endif
+ /* struct STATANYFS statbuf; */
cu_mount_t *mnt_list;
cu_mount_t *mnt_ptr;
cu_mount_t *mnt_list;
cu_mount_t *mnt_ptr;