diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
index a292920969..9c31a163f0 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
@@ -88,4 +88,5 @@ struct glibc21_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 1
+#define STAT_IS_STAT64 1
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/arm/kernel_stat.h b/sysdeps/unix/sysv/linux/arm/kernel_stat.h
index b1bc1459f0..f199bea565 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel_stat.h
@@ -37,4 +37,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/csky/kernel_stat.h b/sysdeps/unix/sysv/linux/csky/kernel_stat.h
index 7970c508ef..5eebe23139 100644
--- a/sysdeps/unix/sysv/linux/csky/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/csky/kernel_stat.h
@@ -18,4 +18,5 @@
 
 #define STAT_IS_KERNEL_STAT  1
 #define XSTAT_IS_XSTAT64     0
+#define STAT_IS_STAT64       0
 #define STATFS_IS_STATFS64   0
diff --git a/sysdeps/unix/sysv/linux/fstat.c b/sysdeps/unix/sysv/linux/fstat.c
index ff3d206fb9..8767f692a0 100644
--- a/sysdeps/unix/sysv/linux/fstat.c
+++ b/sysdeps/unix/sysv/linux/fstat.c
@@ -21,7 +21,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
-#if !XSTAT_IS_XSTAT64
+#if !STAT_IS_STAT64
 int
 __fstat (int fd, struct stat *buf)
 {
diff --git a/sysdeps/unix/sysv/linux/fstat64.c b/sysdeps/unix/sysv/linux/fstat64.c
index 581746ce63..2cca4b194b 100644
--- a/sysdeps/unix/sysv/linux/fstat64.c
+++ b/sysdeps/unix/sysv/linux/fstat64.c
@@ -58,7 +58,7 @@ __fstat64 (int fd, struct stat64 *buf)
 hidden_def (__fstat64)
 weak_alias (__fstat64, fstat64)
 
-#if XSTAT_IS_XSTAT64
+#if STAT_IS_STAT64
 strong_alias (__fstat64, __fstat)
 weak_alias (__fstat64, fstat)
 #endif
diff --git a/sysdeps/unix/sysv/linux/fstatat.c b/sysdeps/unix/sysv/linux/fstatat.c
index 055fb4762e..58f3139532 100644
--- a/sysdeps/unix/sysv/linux/fstatat.c
+++ b/sysdeps/unix/sysv/linux/fstatat.c
@@ -20,7 +20,7 @@
 #include <kernel_stat.h>
 #include <sysdep.h>
 
-#if !XSTAT_IS_XSTAT64
+#if !STAT_IS_STAT64
 # include <kstat_cp.h>
 
 int
diff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c
index 8b1a1a290d..f79e3b40b5 100644
--- a/sysdeps/unix/sysv/linux/fstatat64.c
+++ b/sysdeps/unix/sysv/linux/fstatat64.c
@@ -186,7 +186,7 @@ __fstatat64 (int fd, const char *file, struct stat64 *buf, int flags)
 hidden_def (__fstatat64)
 weak_alias (__fstatat64, fstatat64)
 
-#if XSTAT_IS_XSTAT64
+#if STAT_IS_STAT64
 strong_alias (__fstatat64, __fstatat)
 weak_alias (__fstatat64, fstatat)
 strong_alias (__fstatat64, __GI___fstatat);
diff --git a/sysdeps/unix/sysv/linux/glob.c b/sysdeps/unix/sysv/linux/glob.c
index 7fd526a48c..9dffbf0c54 100644
--- a/sysdeps/unix/sysv/linux/glob.c
+++ b/sysdeps/unix/sysv/linux/glob.c
@@ -31,7 +31,7 @@
 #undef glob64
 #undef __glob64
 
-#if XSTAT_IS_XSTAT64
+#if STAT_IS_STAT64
 strong_alias (__glob, __glob64)
 versioned_symbol (libc, __glob64, glob64, GLIBC_2_27);
 #endif
diff --git a/sysdeps/unix/sysv/linux/glob64.c b/sysdeps/unix/sysv/linux/glob64.c
index 8845921849..36dd75cd45 100644
--- a/sysdeps/unix/sysv/linux/glob64.c
+++ b/sysdeps/unix/sysv/linux/glob64.c
@@ -19,7 +19,7 @@
 #include <sys/stat.h>
 #include <kernel_stat.h>
 
-#if !XSTAT_IS_XSTAT64
+#if !STAT_IS_STAT64
 # include <glob.h>
 # include <dirent.h>
 # include <sys/stat.h>
@@ -50,4 +50,4 @@ libc_hidden_def (__glob64)
 versioned_symbol (libc, __glob64, glob64, GLIBC_2_27);
 libc_hidden_ver (__glob64, glob64)
 # endif
-#endif /* XSTAT_IS_XSTAT64  */
+#endif /* STAT_IS_STAT64  */
diff --git a/sysdeps/unix/sysv/linux/globfree.c b/sysdeps/unix/sysv/linux/globfree.c
index 0deafd500b..d85101c7bf 100644
--- a/sysdeps/unix/sysv/linux/globfree.c
+++ b/sysdeps/unix/sysv/linux/globfree.c
@@ -24,7 +24,7 @@
 #include <posix/globfree.c>
 #undef globfree64
 
-#if XSTAT_IS_XSTAT64
+#if STAT_IS_STAT64
 weak_alias (globfree, globfree64)
 libc_hidden_ver (globfree, globfree64)
 #endif
diff --git a/sysdeps/unix/sysv/linux/globfree64.c b/sysdeps/unix/sysv/linux/globfree64.c
index 3914307aa3..a172febbff 100644
--- a/sysdeps/unix/sysv/linux/globfree64.c
+++ b/sysdeps/unix/sysv/linux/globfree64.c
@@ -20,7 +20,7 @@
 #include <sys/stat.h>
 #include <kernel_stat.h>
 
-#if !XSTAT_IS_XSTAT64
+#if !STAT_IS_STAT64
 
 # include <glob.h>
 
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
index e8ad135e70..97f7d04d0b 100644
--- a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
@@ -33,4 +33,5 @@ struct kernel_stat {
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/i386/kernel_stat.h b/sysdeps/unix/sysv/linux/i386/kernel_stat.h
index b1bc1459f0..f199bea565 100644
--- a/sysdeps/unix/sysv/linux/i386/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/i386/kernel_stat.h
@@ -37,4 +37,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/kernel_stat.h b/sysdeps/unix/sysv/linux/kernel_stat.h
index 6483c76dd9..4236391164 100644
--- a/sysdeps/unix/sysv/linux/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/kernel_stat.h
@@ -18,5 +18,6 @@
 
 /* The default Linux ABI assumes only LFS support.  */
 #define XSTAT_IS_XSTAT64     1
+#define STAT_IS_STAT64       1
 #define STATFS_IS_STATFS64   __STATFS_MATCHES_STATFS64
 #define STAT_IS_KERNEL_STAT  1
diff --git a/sysdeps/unix/sysv/linux/lstat.c b/sysdeps/unix/sysv/linux/lstat.c
index b8920d4e53..f19ff582fe 100644
--- a/sysdeps/unix/sysv/linux/lstat.c
+++ b/sysdeps/unix/sysv/linux/lstat.c
@@ -20,7 +20,7 @@
 #include <fcntl.h>
 #include <kernel_stat.h>
 
-#if !XSTAT_IS_XSTAT64
+#if !STAT_IS_STAT64
 int
 __lstat (const char *file, struct stat *buf)
 {
diff --git a/sysdeps/unix/sysv/linux/lstat64.c b/sysdeps/unix/sysv/linux/lstat64.c
index 5a3dddf4ce..fca9334e50 100644
--- a/sysdeps/unix/sysv/linux/lstat64.c
+++ b/sysdeps/unix/sysv/linux/lstat64.c
@@ -45,7 +45,7 @@ weak_alias (__lstat64, lstat64)
 #undef __lstat
 #undef lstat
 
-#if XSTAT_IS_XSTAT64
+#if STAT_IS_STAT64
 strong_alias (__lstat64, __lstat)
 weak_alias (__lstat64, lstat)
 #endif
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel_stat.h b/sysdeps/unix/sysv/linux/m68k/kernel_stat.h
index b1bc1459f0..f199bea565 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel_stat.h
@@ -37,4 +37,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h b/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h
index d8b3df26b4..735016bbdd 100644
--- a/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/microblaze/kernel_stat.h
@@ -51,4 +51,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index 19524f7ea4..494727de36 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -63,8 +63,10 @@ struct kernel_stat
 #define STAT64_IS_KERNEL_STAT64 0
 #define XSTAT_IS_XSTAT64 0
 #if _MIPS_SIM == _ABI64
+# define STAT_IS_STAT64 1
 # define STATFS_IS_STATFS64 1
 #else
+# define STAT_IS_STAT64 0
 # define STATFS_IS_STATFS64 0
 #endif
 /* MIPS64 has unsigned 32 bit timestamps fields, so use statx as well.  */
diff --git a/sysdeps/unix/sysv/linux/nios2/kernel_stat.h b/sysdeps/unix/sysv/linux/nios2/kernel_stat.h
index 4bd95750a0..a0fa6af2e3 100644
--- a/sysdeps/unix/sysv/linux/nios2/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/nios2/kernel_stat.h
@@ -18,4 +18,5 @@
 
 #define STAT_IS_KERNEL_STAT  1
 #define XSTAT_IS_XSTAT64     0
+#define STAT_IS_STAT64       1
 #define STATFS_IS_STATFS64   0
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h
index 166aa44372..06e9a24c36 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h
@@ -50,4 +50,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/kernel_stat.h b/sysdeps/unix/sysv/linux/s390/s390-32/kernel_stat.h
index b1bc1459f0..f199bea565 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/kernel_stat.h
@@ -37,4 +37,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/sh/kernel_stat.h b/sysdeps/unix/sysv/linux/sh/kernel_stat.h
index b1bc1459f0..f199bea565 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel_stat.h
@@ -37,4 +37,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h
index 4a2df42d37..0cf73b664e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h
@@ -34,4 +34,5 @@ struct kernel_stat
 #define STAT_IS_KERNEL_STAT 0
 #define STAT64_IS_KERNEL_STAT64 1
 #define XSTAT_IS_XSTAT64 0
+#define STAT_IS_STAT64 0
 #define STATFS_IS_STATFS64 0
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
index 29d18908da..6a55faa66e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
@@ -51,8 +51,10 @@ struct kernel_stat64
 #define STAT64_IS_KERNEL_STAT64 0
 #define XSTAT_IS_XSTAT64 1
 #ifdef __arch64__
+# define STAT_IS_STAT64 1
 # define STATFS_IS_STATFS64 1
 #else
+# define STAT_IS_STAT64 0
 # define STATFS_IS_STATFS64 0
 #endif
 #endif /* _KERNEL_STAT_H  */
diff --git a/sysdeps/unix/sysv/linux/stat.c b/sysdeps/unix/sysv/linux/stat.c
index 32cc0eab62..7709f3c989 100644
--- a/sysdeps/unix/sysv/linux/stat.c
+++ b/sysdeps/unix/sysv/linux/stat.c
@@ -20,7 +20,7 @@
 #include <fcntl.h>
 #include <kernel_stat.h>
 
-#if !XSTAT_IS_XSTAT64
+#if !STAT_IS_STAT64
 int
 __stat (const char *file, struct stat *buf)
 {
diff --git a/sysdeps/unix/sysv/linux/stat64.c b/sysdeps/unix/sysv/linux/stat64.c
index a68bd349ce..7941471396 100644
--- a/sysdeps/unix/sysv/linux/stat64.c
+++ b/sysdeps/unix/sysv/linux/stat64.c
@@ -46,7 +46,7 @@ __stat64 (const char *file, struct stat64 *buf)
 hidden_def (__stat64)
 weak_alias (__stat64, stat64)
 
-#if XSTAT_IS_XSTAT64
+#if STAT_IS_STAT64
 strong_alias (__stat64, __stat)
 weak_alias (__stat64, stat)
 #endif
