@@ -32,7 +32,10 @@
using __USE_FILE_OFFSET64 only see the low 32 bits of some
of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-#if defined __USE_FILE_OFFSET64
+#if defined(__USE_FILE_OFFSET64) || __INO_T_MATCHES_INO64_T == 1
+# if __INO_T_MATCHES_INO64_T == 1 && __OFF_T_MATCHES_OFF64_T != 1
+# error "ino_t and off_t must both be the same type"
+# endif
# define __field64(type, type64, name) type64 name
#elif __WORDSIZE == 64
# define __field64(type, type64, name) type name
@@ -51,6 +51,9 @@ static inline int stat_overflow (struct stat *buf)
/* Note that f_files and f_ffree may validly be a sign-extended -1. */
static inline int statfs_overflow (struct statfs *buf)
{
+#if defined (__INO_T_MATCHES_INO64_T)
+ return 0;
+#else
if (buf->__f_blocks_pad == 0 && buf->__f_bfree_pad == 0
&& buf->__f_bavail_pad == 0
&& (buf->__f_files_pad == 0
@@ -61,4 +64,5 @@ static inline int statfs_overflow (struct statfs *buf)
__set_errno (EOVERFLOW);
return -1;
+#endif
}