[collectd] [PATCH] Added large file support ("backported" to collectd-3).
Sebastian Harl
sh at tokkee.org
Mon May 14 20:57:03 CEST 2007
This adds large file support to collectd by using the AC_SYS_LARGEFILE macro
in configure.in. In order to apply any necessary options to all parts of
collectd, we have to make sure config.h is included in all source files
(either directly or by including collectd.h) and before any other header files
are included.
This should fix http://bugs.debian.org/422212.
Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
configure.in | 2 ++
src/common.c | 4 ++++
src/multimeter.c | 7 ++++---
src/network.c | 4 ++++
src/utils_debug.c | 4 ++++
src/utils_ignorelist.c | 4 ++++
src/utils_mount.c | 4 +++-
7 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/configure.in b/configure.in
index 0f6d3c0..9fe842a 100644
--- a/configure.in
+++ b/configure.in
@@ -7,6 +7,8 @@ AC_LANG(C)
AC_PREFIX_DEFAULT("/opt/collectd")
+AC_SYS_LARGEFILE
+
#
# Checks for programs.
#
diff --git a/src/common.c b/src/common.c
index 5487b32..e7d561f 100644
--- a/src/common.c
+++ b/src/common.c
@@ -22,6 +22,10 @@
* Niki W. Waibel <niki.waibel at gmx.net>
**/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "common.h"
#include "utils_debug.h"
diff --git a/src/multimeter.c b/src/multimeter.c
index 46438bf..09073ab 100644
--- a/src/multimeter.c
+++ b/src/multimeter.c
@@ -23,13 +23,14 @@
*
**/
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <math.h>
#include "collectd.h"
#include "common.h"
#include "plugin.h"
+#include <termios.h>
+#include <sys/ioctl.h>
+#include <math.h>
+
#define MODULE_NAME "multimeter"
static char *multimeter_file = "multimeter.rrd";
diff --git a/src/network.c b/src/network.c
index e9ba84b..f2908d3 100644
--- a/src/network.c
+++ b/src/network.c
@@ -20,6 +20,10 @@
* Florian octo Forster <octo at verplant.org>
**/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/utils_debug.c b/src/utils_debug.c
index 9fc9040..067af21 100644
--- a/src/utils_debug.c
+++ b/src/utils_debug.c
@@ -20,6 +20,10 @@
* Niki W. Waibel <niki.waibel at gmx.net>
**/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "common.h"
#include "utils_debug.h"
diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c
index 532eb4b..7f9e5c6 100644
--- a/src/utils_ignorelist.c
+++ b/src/utils_ignorelist.c
@@ -47,6 +47,10 @@
* return;
**/
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "common.h"
#include "utils_debug.h"
#include "utils_ignorelist.h"
diff --git a/src/utils_mount.c b/src/utils_mount.c
index 7748c61..0e1a5c9 100644
--- a/src/utils_mount.c
+++ b/src/utils_mount.c
@@ -21,7 +21,9 @@
* Niki W. Waibel <niki.waibel at gmx.net>
**/
-
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
#include "common.h"
#if HAVE_XFS_XQM_H
--
1.4.4.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070514/af6b05c5/attachment.pgp
More information about the collectd
mailing list