forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
collectd-5.5.1-issue-1637.patch
68 lines (58 loc) · 1.95 KB
/
collectd-5.5.1-issue-1637.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 7630585ca596af6334f89db26272d80f4ef02a8a Mon Sep 17 00:00:00 2001
From: Ruben Kerkhof <[email protected]>
Date: Sat, 26 Mar 2016 18:18:44 +0100
Subject: [PATCH 4/4] Fix building with xfsprogs 4.5.0
commit 865a6c83250e3d4381596a0d937df31d563f97c6 upstream.
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 | 13 ++++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 129b9d4..a2058d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -593,7 +593,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 sys/vmmeter.h kvm.h wordexp.h locale.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 sys/vmmeter.h kvm.h wordexp.h locale.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 f2b7943..cf5e97a 100644
--- a/src/utils_mount.c
+++ b/src/utils_mount.c
@@ -21,18 +21,21 @@
* Niki W. Waibel <[email protected]>
**/
-#include "collectd.h"
-#include "utils_mount.h"
-
-#include "common.h" /* sstrncpy() et alii */
-#include "plugin.h" /* ERROR() macro */
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
#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 "common.h"
+#include "plugin.h"
+#include "utils_mount.h"
+
#if HAVE_GETVFSSTAT
# if HAVE_SYS_TYPES_H
# include <sys/types.h>
--
2.7.4