diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/stat.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/include/asm/stat.h b/arch/x86/include/asm/stat.h index e0b1d9bbcbc6..7b3ddc348585 100644 --- a/arch/x86/include/asm/stat.h +++ b/arch/x86/include/asm/stat.h | |||
@@ -25,6 +25,12 @@ struct stat { | |||
25 | unsigned long __unused5; | 25 | unsigned long __unused5; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | /* We don't need to memset the whole thing just to initialize the padding */ | ||
29 | #define INIT_STRUCT_STAT_PADDING(st) do { \ | ||
30 | st.__unused4 = 0; \ | ||
31 | st.__unused5 = 0; \ | ||
32 | } while (0) | ||
33 | |||
28 | #define STAT64_HAS_BROKEN_ST_INO 1 | 34 | #define STAT64_HAS_BROKEN_ST_INO 1 |
29 | 35 | ||
30 | /* This matches struct stat64 in glibc2.1, hence the absolutely | 36 | /* This matches struct stat64 in glibc2.1, hence the absolutely |
@@ -63,6 +69,12 @@ struct stat64 { | |||
63 | unsigned long long st_ino; | 69 | unsigned long long st_ino; |
64 | }; | 70 | }; |
65 | 71 | ||
72 | /* We don't need to memset the whole thing just to initialize the padding */ | ||
73 | #define INIT_STRUCT_STAT64_PADDING(st) do { \ | ||
74 | memset(&st.__pad0, 0, sizeof(st.__pad0)); \ | ||
75 | memset(&st.__pad3, 0, sizeof(st.__pad3)); \ | ||
76 | } while (0) | ||
77 | |||
66 | #else /* __i386__ */ | 78 | #else /* __i386__ */ |
67 | 79 | ||
68 | struct stat { | 80 | struct stat { |
@@ -87,6 +99,15 @@ struct stat { | |||
87 | unsigned long st_ctime_nsec; | 99 | unsigned long st_ctime_nsec; |
88 | long __unused[3]; | 100 | long __unused[3]; |
89 | }; | 101 | }; |
102 | |||
103 | /* We don't need to memset the whole thing just to initialize the padding */ | ||
104 | #define INIT_STRUCT_STAT_PADDING(st) do { \ | ||
105 | st.__pad0 = 0; \ | ||
106 | st.__unused[0] = 0; \ | ||
107 | st.__unused[1] = 0; \ | ||
108 | st.__unused[2] = 0; \ | ||
109 | } while (0) | ||
110 | |||
90 | #endif | 111 | #endif |
91 | 112 | ||
92 | /* for 32bit emulation and 32 bit kernels */ | 113 | /* for 32bit emulation and 32 bit kernels */ |