From: Sebastian Harl Date: Mon, 14 May 2007 18:57:03 +0000 (+0200) Subject: [PATCH] Added large file support ("backported" to collectd-3). X-Git-Tag: collectd-3.11.5~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9e7918de3468233376be0cb0c7c7ab5a06ef8bce;p=collectd.git [PATCH] Added large file support ("backported" to collectd-3). 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 --- diff --git a/configure.in b/configure.in index 0f6d3c09..9fe842ac 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 5487b326..e7d561fd 100644 --- a/src/common.c +++ b/src/common.c @@ -22,6 +22,10 @@ * Niki W. Waibel **/ +#if HAVE_CONFIG_H +# include +#endif + #include "common.h" #include "utils_debug.h" diff --git a/src/multimeter.c b/src/multimeter.c index 46438bf3..09073aba 100644 --- a/src/multimeter.c +++ b/src/multimeter.c @@ -23,13 +23,14 @@ * **/ -#include -#include -#include #include "collectd.h" #include "common.h" #include "plugin.h" +#include +#include +#include + #define MODULE_NAME "multimeter" static char *multimeter_file = "multimeter.rrd"; diff --git a/src/network.c b/src/network.c index e9ba84bb..f2908d3c 100644 --- a/src/network.c +++ b/src/network.c @@ -20,6 +20,10 @@ * Florian octo Forster **/ +#if HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/src/utils_debug.c b/src/utils_debug.c index 9fc9040b..067af21c 100644 --- a/src/utils_debug.c +++ b/src/utils_debug.c @@ -20,6 +20,10 @@ * Niki W. Waibel **/ +#if HAVE_CONFIG_H +# include +#endif + #include "common.h" #include "utils_debug.h" diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c index 532eb4b0..7f9e5c6d 100644 --- a/src/utils_ignorelist.c +++ b/src/utils_ignorelist.c @@ -47,6 +47,10 @@ * return; **/ +#if HAVE_CONFIG_H +# include +#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 7748c610..0e1a5c9c 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -21,7 +21,9 @@ * Niki W. Waibel **/ - +#if HAVE_CONFIG_H +# include +#endif #include "common.h" #if HAVE_XFS_XQM_H