Fix compilation against >=xfsprogs-4.7.0
authorThomas Deutschmann <whissi@gentoo.org>
Fri, 2 Sep 2016 12:59:46 +0000 (14:59 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Fri, 2 Sep 2016 13:53:44 +0000 (15:53 +0200)
[backport of commit 225ee7bb45152c51c1c9508b2e776cef36d2682d]

Suggested-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Gentoo-Bug: https://bugs.gentoo.org/590998
Fixes: https://github.com/collectd/collectd/issues/1877

src/utils_mount.c

index da53b98..37b52d6 100644 (file)
 # include "config.h"
 #endif
 
+#define _GNU_SOURCE
+
+#include "collectd.h"
+#include "utils_mount.h"
+
 #if HAVE_XFS_XQM_H
-# define _GNU_SOURCE
 # include <xfs/xqm.h>
 #define XFS_SUPER_MAGIC_STR "XFSB"
 #define XFS_SUPER_MAGIC2_STR "BSFX"
 #endif
 
-#include "collectd.h"
-#include "utils_mount.h"
-
 #include "common.h" /* sstrncpy() et alii */
 #include "plugin.h" /* ERROR() macro */