diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-17 03:12:06 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-11-17 03:12:06 +0000 |
commit | 5bb58a71adb7754b6cbdf8312115191068c0dc71 (patch) | |
tree | 7c447273586fca26bed538ab5be62fd7fe0a5b6a /src | |
parent | 99e10817b057cb44bb62ad18c78d0b009d208984 (diff) | |
download | coreutils-5bb58a71adb7754b6cbdf8312115191068c0dc71.tar.xz |
(STATFS): New macro, for portability to Solaris 9.
(do_statfs): Use it.
Diffstat (limited to 'src')
-rw-r--r-- | src/stat.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/stat.c b/src/stat.c index e982a3999..f0cc688ea 100644 --- a/src/stat.c +++ b/src/stat.c @@ -63,6 +63,9 @@ # if HAVE_STRUCT_STATVFS_F_NAMEMAX # define SB_F_NAMEMAX(S) ((uintmax_t) ((S)->f_namemax)) # endif +# if STAT_STATVFS +# define STATFS statvfs +# endif #else # define STRUCT_STATVFS struct statfs # define HAVE_STRUCT_STATXFS_F_TYPE HAVE_STRUCT_STATFS_F_TYPE @@ -71,6 +74,10 @@ # endif #endif +#ifndef STATFS +# define STATFS statfs +#endif + #ifndef SB_F_NAMEMAX /* NetBSD 1.5.2 has neither f_namemax nor f_namelen. */ # define SB_F_NAMEMAX(S) "*" @@ -560,7 +567,7 @@ do_statfs (char const *filename, bool terse, char const *format) { STRUCT_STATVFS statfsbuf; - if (statfs (filename, &statfsbuf) != 0) + if (STATFS (filename, &statfsbuf) != 0) { error (0, errno, _("cannot read file system information for %s"), quote (filename)); |