From: Florian Forster Date: Thu, 11 Jun 2015 09:14:04 +0000 (+0100) Subject: zone plugin: Undefine _FILE_OFFSET_BITS when building on 32bit hosts. X-Git-Tag: collectd-5.6.0~691 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=edb3002086ef96755804b2d155728cb9a0428935;p=collectd.git zone plugin: Undefine _FILE_OFFSET_BITS when building on 32bit hosts. Fixes: #1077 --- diff --git a/src/zone.c b/src/zone.c index cb3869d6..188fbe3d 100644 --- a/src/zone.c +++ b/src/zone.c @@ -20,7 +20,15 @@ * Dagobert Michelsen (forward-porting) **/ -#define _BSD_SOURCE +#if HAVE_CONFIG_H +# include "config.h" +# undef HAVE_CONFIG_H +#endif +/* avoid procfs.h error "Cannot use procfs in the large file compilation environment" */ +#if !defined(_LP64) && _FILE_OFFSET_BITS == 64 +# undef _FILE_OFFSET_BITS +# undef _LARGEFILE64_SOURCE +#endif #include "collectd.h" #include "common.h"