From 6291f055adf8b34490e8fc24a9f72b330a3d09f1 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 30 Oct 2022 11:31:16 +0100 Subject: [PATCH] squash! stat --- include/linux/arm/kernel-stat.h | 25 +++++++++++++++---------- include/linux/x86/kernel-stat.h | 25 +++++++++++++++---------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/include/linux/arm/kernel-stat.h b/include/linux/arm/kernel-stat.h index aa70ee06..f44a1ee6 100644 --- a/include/linux/arm/kernel-stat.h +++ b/include/linux/arm/kernel-stat.h @@ -24,6 +24,18 @@ #include +#if __SIZEOF_LONG_LONG__ == 8 +#define stat stat32 +#define stat64 stat + +#undef SYS_stat +#define SYS_stat SYS_stat64 +#undef SYS_lstat +#define SYS_lstat SYS_lstat64 +#undef SYS_fstat +#define SYS_fstat SYS_fstat64 +#endif // __SIZEOF_LONG_LONG__ == 8 + // *INDENT-OFF* struct stat { @@ -46,7 +58,7 @@ struct stat unsigned long __pad0; unsigned long __pad1; }; -#if __SIZEOF_LONG_LONG__ == 8 + struct stat64 { unsigned long long st_dev; @@ -70,14 +82,7 @@ struct stat64 unsigned long long st_ino; }; -#define stat stat64 -#undef SYS_stat -#define SYS_stat SYS_stat64 -#undef SYS_lstat -#define SYS_lstat SYS_lstat64 -#undef SYS_fstat -#define SYS_fstat SYS_fstat64 - -#endif // HAVE_LONG_LONG +#undef stat +#undef stat64 #endif // __MES_LINUX_ARM_KERNEL_STAT_H diff --git a/include/linux/x86/kernel-stat.h b/include/linux/x86/kernel-stat.h index bab081f8..9f33ece8 100644 --- a/include/linux/x86/kernel-stat.h +++ b/include/linux/x86/kernel-stat.h @@ -24,6 +24,18 @@ #include +#if __SIZEOF_LONG_LONG__ == 8 +#define stat stat32 +#define stat64 stat + +#undef SYS_stat +#define SYS_stat SYS_stat64 +#undef SYS_lstat +#define SYS_lstat SYS_lstat64 +#undef SYS_fstat +#define SYS_fstat SYS_fstat64 +#endif // __SIZEOF_LONG_LONG__ == 8 + // *INDENT-OFF* struct stat { @@ -46,7 +58,7 @@ struct stat unsigned long __pad0; unsigned long __pad1; }; -#if __SIZEOF_LONG_LONG__ == 8 + struct stat64 { unsigned long long st_dev; @@ -70,14 +82,7 @@ struct stat64 unsigned long long st_ino; }; -#define stat stat64 -#undef SYS_stat -#define SYS_stat SYS_stat64 -#undef SYS_lstat -#define SYS_lstat SYS_lstat64 -#undef SYS_fstat -#define SYS_fstat SYS_fstat64 - -#endif // HAVE_LONG_LONG +#undef stat +#undef stat64 #endif // __MES_LINUX_X86_KERNEL_STAT_H