summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-06-17 17:40:45 +0000
committerJim Meyering <jim@meyering.net>2003-06-17 17:40:45 +0000
commit588e9f6a69b2bf90bf824a5a5a7adaf0a77af72a (patch)
tree5ef719c9fdf99d823b5794d6bc16de1f55f65306 /src
parentd14b7020169491bf0568ff9e01182689852aa799 (diff)
downloadcoreutils-588e9f6a69b2bf90bf824a5a5a7adaf0a77af72a.tar.xz
Fix for build failure on Ultrix 4.3.
Include sys/statvfs.h in preference to sys/vfs.h. Include sys/param.h and sys/mount.h on ultrix.
Diffstat (limited to 'src')
-rw-r--r--src/stat.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/stat.c b/src/stat.c
index af19a17be..020e73fdf 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -25,10 +25,10 @@
#include <grp.h>
#include <unistd.h>
#include <time.h>
-#if HAVE_SYS_VFS_H
-# include <sys/vfs.h>
-#elif HAVE_SYS_STATVFS_H && HAVE_STRUCT_STATVFS_F_BASETYPE
+#if HAVE_SYS_STATVFS_H && HAVE_STRUCT_STATVFS_F_BASETYPE
# include <sys/statvfs.h>
+#elif HAVE_SYS_VFS_H
+# include <sys/vfs.h>
#elif HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
/* NOTE: freebsd5.0 needs sys/param.h and sys/mount.h for statfs.
It does have statvfs.h, but shouldn't use it, since it doesn't
@@ -36,11 +36,12 @@
/* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
# include <sys/param.h>
# include <sys/mount.h>
-#elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
+# if HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
/* Ultrix 4.4 needs these for the declaration of struct statfs. */
-# include <netinet/in.h>
-# include <nfs/nfs_clnt.h>
-# include <nfs/vfs.h>
+# include <netinet/in.h>
+# include <nfs/nfs_clnt.h>
+# include <nfs/vfs.h>
+# endif
#endif
#include "system.h"