Hi Andreas, On Wed, Dec 30, 2009 at 10:38:40AM +0100, Andreas Maus wrote: > The only error occurs on OpenBSD 4.3 compiling the df plugin: […] > df.c:313: error: structure has no member named `f_favail'
> The member f_favail in the structure statfs has been introduced in OpenBSD > 4.4. > > I modified the configure.in and src/df.c files to check the availability of > f_favail (see attached diff). Thanks for your patch! See a minor comment below. > +#ifdef HAVE_STATFS_F_FAVAIL > inode_free = (uint64_t) statbuf.f_favail; > inode_reserved = (uint64_t) (statbuf.f_ffree - > statbuf.f_favail); > +#else > + inode_free = (uint64_t) statbuf.f_ffree; > + inode_reserved = (uint64_t) 0; > +#endif Rather than setting the value to zero, if f_favail is not available, I'd not submit the free (and reserved, which is calculated using f_favail) at all. Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
signature.asc
Description: Digital signature
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
