[PATCH] linux: Define STAT64_IS_KERNEL_STAT64 by default
Stafford Horne
shorne@gmail.com
Sat Nov 20 21:09:01 GMT 2021
In commit 36260d5035 ("linux: Set default kernel_stat.h to LFS") the
default for STAT64_IS_KERNEL_STAT64 was removed. This patch adds it
back.
For architectures that want to used the default kernel_stat.h and do not
have __NR_newfstatat, STAT64_IS_KERNEL_STAT64 needs to be defined. Set
the default as 1 as modern port's stat64 struct should match the kernel
stat64 layout.
I tested this on the OpenRISC port and it seems to work fine. Currently,
all archs that use the default kernel_stat.h define __NR_newfstatat so
they will not use the STAT64_IS_KERNEL_STAT64 macro. However, arc seems
to be an outlier it uses the default kernel_stat.h, but does not define
__NR_newfstatat or __NR_fstatat64 I am not clear how arc works here.
---
sysdeps/unix/sysv/linux/kernel_stat.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/sysdeps/unix/sysv/linux/kernel_stat.h b/sysdeps/unix/sysv/linux/kernel_stat.h
index 6c1b175cb4..b8c376f41e 100644
--- a/sysdeps/unix/sysv/linux/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/kernel_stat.h
@@ -20,3 +20,4 @@
#define XSTAT_IS_XSTAT64 1
#define STATFS_IS_STATFS64 __STATFS_MATCHES_STATFS64
#define STAT_IS_KERNEL_STAT 1
+#define STAT64_IS_KERNEL_STAT64 1
--
2.31.1
More information about the Libc-alpha
mailing list