summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/fstatfs64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/fstatfs64.c')
-rw-r--r--sysdeps/unix/sysv/linux/fstatfs64.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/fstatfs64.c b/sysdeps/unix/sysv/linux/fstatfs64.c
index a624de697b..78c9a83bae 100644
--- a/sysdeps/unix/sysv/linux/fstatfs64.c
+++ b/sysdeps/unix/sysv/linux/fstatfs64.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FD resides.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,9 +18,21 @@
#include <errno.h>
#include <string.h>
-#include <sys/statfs.h>
#include <stddef.h>
#include <sysdep.h>
+#include <kernel_stat.h>
+
+/* Hide the prototypes for __fstatfs and fstatfs so that GCC will not
+ complain about the different function signatures if they are aliased
+ to __fstat64. If STATFS_IS_STATFS64 is not zero then the statfs and
+ statfs64 structures have an identical layout but different type names. */
+
+#if STATFS_IS_STATFS64
+# define __fstatfs __fstatfs_disable
+# define fstatfs fstatfs_disable
+#endif
+#include <sys/statfs.h>
+
#include <kernel-features.h>
/* Defined in statfs64.c. */
@@ -70,3 +82,11 @@ __fstatfs64 (int fd, struct statfs64 *buf)
#endif
}
weak_alias (__fstatfs64, fstatfs64)
+
+#undef __fstatfs
+#undef fstatfs
+
+#if STATFS_IS_STATFS64
+weak_alias (__fstatfs64, __fstatfs)
+weak_alias (__fstatfs64, fstatfs)
+#endif