From 9e878fa9578469332a44ae7d9813a0d29697eeaf Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Mon, 28 Nov 2016 08:51:01 -0800 Subject: Fix for [f]statfs64/[f]statfs aliasing patch * sysdeps/unix/sysv/linux/fstatfs64.c: Reorder include files, only alias fstatfs and __fstatfs if STATFS_IS_STATFS64 is non-zero. * sysdeps/unix/sysv/linux/statfs64.c: Ditto for statfs and __statfs. --- sysdeps/unix/sysv/linux/fstatfs64.c | 19 +++++++++++-------- sysdeps/unix/sysv/linux/statfs64.c | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/unix/sysv/linux/fstatfs64.c b/sysdeps/unix/sysv/linux/fstatfs64.c index a95fe187ca..42b225778b 100644 --- a/sysdeps/unix/sysv/linux/fstatfs64.c +++ b/sysdeps/unix/sysv/linux/fstatfs64.c @@ -16,20 +16,23 @@ License along with the GNU C Library; if not, see . */ +#include +#include +#include +#include +#include + /* 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. */ -#define __fstatfs __fstatfs_disable -#define fstatfs fstatfs_disable - -#include -#include +#if STATFS_IS_STATFS64 +# define __fstatfs __fstatfs_disable +# define fstatfs fstatfs_disable +#endif #include -#include -#include -#include + #include /* Defined in statfs64.c. */ diff --git a/sysdeps/unix/sysv/linux/statfs64.c b/sysdeps/unix/sysv/linux/statfs64.c index 4315fe501c..9dbd61f562 100644 --- a/sysdeps/unix/sysv/linux/statfs64.c +++ b/sysdeps/unix/sysv/linux/statfs64.c @@ -16,20 +16,23 @@ License along with the GNU C Library; if not, see . */ +#include +#include +#include +#include +#include + /* 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. */ -#define __statfs __statfs_disable -#define statfs statfs_disable - -#include -#include +#if STATFS_IS_STATFS64 +# define __statfs __statfs_disable +# define statfs statfs_disable +#endif #include -#include -#include -#include + #include -- cgit 1.4.1