summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/statfs64.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 17:45:04 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 17:45:04 +0000
commit6aa82888e61d3e2232926ee68e764f17eae2e7e1 (patch)
tree17b2fb350da15d1d097f22dc7e2e7d20db1bd486 /sysdeps/unix/sysv/linux/statfs64.c
parentffbe9c552a1009167ec7a765c1543c7f3e4169d6 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/sendmsg-SCM_RIGHTS' into t/sendmsg-SCM_RIGHTS
Diffstat (limited to 'sysdeps/unix/sysv/linux/statfs64.c')
-rw-r--r--sysdeps/unix/sysv/linux/statfs64.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/statfs64.c b/sysdeps/unix/sysv/linux/statfs64.c
index de422618fe..01c1f08d88 100644
--- a/sysdeps/unix/sysv/linux/statfs64.c
+++ b/sysdeps/unix/sysv/linux/statfs64.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FILE 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 __statfs and statfs so that GCC will not
+ complain about the different function signatures if they are aliased
+ to __stat64. 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 __statfs __statfs_disable
+# define statfs statfs_disable
+#endif
+#include <sys/statfs.h>
+
#include <kernel-features.h>
@@ -72,3 +84,12 @@ __statfs64 (const char *file, struct statfs64 *buf)
#endif
}
weak_alias (__statfs64, statfs64)
+
+#undef __statfs
+#undef statfs
+
+#if STATFS_IS_STATFS64
+weak_alias (__statfs64, __statfs)
+weak_alias (__statfs64, statfs)
+libc_hidden_ver (__statfs64, __statfs)
+#endif