X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fswap.c;h=de9b5f3de430ef08fa034df37aae168a9e0f1057;hb=799daf946e48c5c3b5f6b016bc9290fe562f062d;hp=ca3b5efa342da9bc66abaf78513699a655966b8b;hpb=c01301e8a69b8d53b06b522b107c97dcb65093ad;p=collectd.git diff --git a/src/swap.c b/src/swap.c index ca3b5efa..de9b5f3d 100644 --- a/src/swap.c +++ b/src/swap.c @@ -19,6 +19,16 @@ * Florian octo Forster **/ +#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" @@ -26,6 +36,9 @@ #if HAVE_SYS_SWAP_H # include #endif +#if HAVE_VM_ANON_H +# include +#endif #if HAVE_SYS_PARAM_H # include #endif