Pavel Tsekov <[EMAIL PROTECTED]> wrote: > URL: <http://savannah.gnu.org/bugs/?17643> > > Summary: Include sys/param.h when testing whether > getmntinfo() fills struct statvfs. > > The recent changes with regard to compilation failures in mountlist.c on > NetBSD 3.0 added a new check in ls-mntd-fs.m4. Based on its result either > MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 is defined. MOUNTED_GETMNTINFO2 > should be defined only on NetBSD 3.0 but it is erronously define on > FreeBSD 6.x too. The reason for the error is that getmntinfo() > on FreeBSD needs sys/param.h too be included too. I guess that Darwin systems > are also affected but I cannot test . Please, > apply the attached patch or similiar.
Thank you for the fine report and patch. I've applied it, in the gnulib project, since that's where coreutils gets that file, now: 2006-09-08 Jim Meyering <[EMAIL PROTECTED]> Avoid new build failure on FreeBSD 6.0. * ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include <sys/param.h> when testing whether getmntinfo uses statvfs. Patch by Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>. Index: ls-mntd-fs.m4 =================================================================== RCS file: /sources/gnulib/gnulib/m4/ls-mntd-fs.m4,v retrieving revision 1.34 diff -u -r1.34 ls-mntd-fs.m4 --- ls-mntd-fs.m4 21 Aug 2006 06:11:26 -0000 1.34 +++ ls-mntd-fs.m4 8 Sep 2006 09:10:21 -0000 @@ -1,4 +1,4 @@ -#serial 23 +#serial 24 # How to list mounted file systems. # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software @@ -237,6 +237,9 @@ AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo2, [ AC_TRY_COMPILE([ +#if HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif #include <sys/types.h> #if HAVE_SYS_MOUNT_H # include <sys/mount.h>