summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65e2acb)
raw | patch | inline | side by side (parent: 65e2acb)
author | Doug MacEachern <dougm@hyperic.com> | |
Fri, 22 May 2009 22:03:57 +0000 (15:03 -0700) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 27 May 2009 08:58:49 +0000 (10:58 +0200) |
configure.in | patch | blob | history | |
src/swap.c | patch | blob | history |
diff --git a/configure.in b/configure.in
index 0fd6e78d352edb2600428191e6548a8cbbaddacc..062f8aa55a471a05438bccaf83fbbf58f6d45272 100644 (file)
--- a/configure.in
+++ b/configure.in
have_sys_swap_h="yes"
AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
[
+#undef _FILE_OFFSET_BITS
+#undef _LARGEFILE64_SOURCE
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
diff --git a/src/swap.c b/src/swap.c
index 1779f861b9b91b88d86e3fbfef6423a3d5bfbb57..de9b5f3de430ef08fa034df37aae168a9e0f1057 100644 (file)
--- a/src/swap.c
+++ b/src/swap.c
* Florian octo Forster <octo at verplant.org>
**/
+#if HAVE_CONFIG_H
+# include "config.h"
+# undef HAVE_CONFIG_H
+#endif
+/* avoid swap.h error "Cannot use swapctl in the large files compilation environment" */
+#if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
+# undef _FILE_OFFSET_BITS
+# undef _LARGEFILE64_SOURCE
+#endif
+
#include "collectd.h"
#include "common.h"
#include "plugin.h"