diff --git a/src/utils_mount.c b/src/utils_mount.c
index 05bc1a144069d04c8559150aa15a4afa76852f80..37b52d683ceb4e27154c67140e8cd73111b050da 100644 (file)
--- a/src/utils_mount.c
+++ b/src/utils_mount.c
# include "config.h"
#endif
-#include "common.h"
+#define _GNU_SOURCE
+
+#include "collectd.h"
+#include "utils_mount.h"
+
#if HAVE_XFS_XQM_H
# include <xfs/xqm.h>
#define XFS_SUPER_MAGIC_STR "XFSB"
#define XFS_SUPER_MAGIC2_STR "BSFX"
#endif
-#include "plugin.h"
-#include "utils_mount.h"
+#include "common.h" /* sstrncpy() et alii */
+#include "plugin.h" /* ERROR() macro */
+
#if HAVE_GETVFSSTAT
# if HAVE_SYS_TYPES_H
#elif HAVE_GETVFSSTAT || HAVE_GETFSSTAT
static cu_mount_t *cu_mount_getfsstat (void)
{
-#if HAVE_GETVFSSTAT
-# define STRUCT_STATFS struct statvfs
-# define CMD_STATFS getvfsstat
-# define FLAGS_STATFS ST_NOWAIT
-/* #endif HAVE_GETVFSSTAT */
-#elif HAVE_GETFSSTAT
+#if HAVE_GETFSSTAT
# define STRUCT_STATFS struct statfs
# define CMD_STATFS getfsstat
# define FLAGS_STATFS MNT_NOWAIT
-#endif /* HAVE_GETFSSTAT */
+/* #endif HAVE_GETFSSTAT */
+#elif HAVE_GETVFSSTAT
+# define STRUCT_STATFS struct statvfs
+# define CMD_STATFS getvfsstat
+# define FLAGS_STATFS ST_NOWAIT
+#endif /* HAVE_GETVFSSTAT */
int bufsize;
STRUCT_STATFS *buf;