The coreutils 'stat' command invokes 'statfs (filename, &statfsbuf)',
but on Solaris 8 the statfs function takes 4 arguments, not 2, and the
arguments are of different types. I assume that this leads to bogus
results though I haven't tested it.
In the long run, I suppose that 'stat' should be changed to call
get_fs_usage, which seems to be better-ported: it knows about
the Solaris way of invoking statfs. This'd take some work, though.
In the short run, here's a simple preventive measure that will cause
'stat.c' to fail to compile on Solaris 8: this is bad but it is better
than undefined behavior at runtime.
2004-03-28 Paul Eggert <[EMAIL PROTECTED]>
* src/stat.c [HAVE_SYS_STATFS_H]: Include <sys/statfs.h>, for
a statfs prototype on Solaris 8.
Index: stat.c
===================================================================
RCS file: /home/meyering/coreutils/cu/src/stat.c,v
retrieving revision 1.66
diff -p -u -r1.66 stat.c
--- stat.c 5 Feb 2004 13:46:41 -0000 1.66
+++ stat.c 28 Mar 2004 00:57:24 -0000
@@ -42,6 +42,10 @@
# endif
#endif
+#if HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
+#endif
+
#include "system.h"
#include "error.h"
_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils