summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/statvfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/statvfs.c')
-rw-r--r--sysdeps/unix/sysv/linux/statvfs.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/statvfs.c b/sysdeps/unix/sysv/linux/statvfs.c
index 5eef62c5f6..51d4f4fd0c 100644
--- a/sysdeps/unix/sysv/linux/statvfs.c
+++ b/sysdeps/unix/sysv/linux/statvfs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -17,16 +17,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <errno.h>
-#include <mntent.h>
-#include <paths.h>
-#include <stdio_ext.h>
-#include <string.h>
-#include <sys/mount.h>
+#include <stddef.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
+extern void __internal_statvfs (const char *name, struct statvfs *buf,
+ struct statfs *fsbuf, struct stat64 *st);
+
int
statvfs (const char *file, struct statvfs *buf)
@@ -38,8 +36,9 @@ statvfs (const char *file, struct statvfs *buf)
if (__statfs (file, &fsbuf) < 0)
return -1;
-#define STAT(st) stat64 (file, st)
-#include "internal_statvfs.c"
+ /* Convert the result. */
+ __internal_statvfs (file, buf, &fsbuf,
+ stat64 (file, &st) == -1 ? NULL : &st);
/* We signal success if the statfs call succeeded. */
return 0;