From 865a6c83250e3d4381596a0d937df31d563f97c6 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 26 Mar 2016 18:18:44 +0100 Subject: [PATCH] Fix building with xfsprogs 4.5.0 xfsprogs 4.5.0 started to use off64_t in its headers, which is hidden behind _GNU_SOURCE Fixes #1637 --- configure.ac | 7 ++++++- src/utils_mount.c | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb9ef34c..fd2e25cb 100644 --- a/configure.ac +++ b/configure.ac @@ -601,7 +601,12 @@ AC_CHECK_HEADERS(linux/un.h, [], [], #endif ]) -AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h) +AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h) + +AC_CHECK_HEADERS([xfs/xqm.h], [], [], +[ +#define _GNU_SOURCE +]) # For the dns plugin AC_CHECK_HEADERS(arpa/nameser.h) diff --git a/src/utils_mount.c b/src/utils_mount.c index 6555b418..d303677d 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -24,13 +24,14 @@ # include "config.h" #endif -#include "common.h" #if HAVE_XFS_XQM_H +# define _GNU_SOURCE # include #define XFS_SUPER_MAGIC_STR "XFSB" #define XFS_SUPER_MAGIC2_STR "BSFX" #endif +#include "common.h" #include "plugin.h" #include "utils_mount.h" -- 2.11.0