Commit 1bf883c1 authored by Arnd Bergmann's avatar Arnd Bergmann

y2038: stat: avoid 'time_t' in 'struct stat'

The time_t definition may differ between user space and kernel space,
so replace time_t with an unambiguous 'long' for the mips and sparc.

The same structures also contain 'off_t', which has the same problem,
so replace that as well on those two architectures and powerpc.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent caf5e32d
......@@ -26,17 +26,17 @@ struct stat {
gid_t st_gid;
unsigned st_rdev;
long st_pad2[2];
off_t st_size;
long st_size;
long st_pad3;
/*
* Actually this should be timestruc_t st_atime, st_mtime and st_ctime
* but we don't have it under Linux.
*/
time_t st_atime;
long st_atime;
long st_atime_nsec;
time_t st_mtime;
long st_mtime;
long st_mtime_nsec;
time_t st_ctime;
long st_ctime;
long st_ctime_nsec;
long st_blksize;
long st_blocks;
......@@ -70,13 +70,13 @@ struct stat64 {
* Actually this should be timestruc_t st_atime, st_mtime and st_ctime
* but we don't have it under Linux.
*/
time_t st_atime;
long st_atime;
unsigned long st_atime_nsec; /* Reserved for st_atime expansion */
time_t st_mtime;
long st_mtime;
unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */
time_t st_ctime;
long st_ctime;
unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */
unsigned long st_blksize;
......@@ -105,7 +105,7 @@ struct stat {
unsigned int st_rdev;
unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */
off_t st_size;
long st_size;
/*
* Actually this should be timestruc_t st_atime, st_mtime and st_ctime
......
......@@ -40,7 +40,7 @@ struct stat {
uid_t st_uid;
gid_t st_gid;
unsigned long st_rdev;
off_t st_size;
long st_size;
unsigned long st_blksize;
unsigned long st_blocks;
unsigned long st_atime;
......
......@@ -14,12 +14,12 @@ struct stat {
uid_t st_uid;
gid_t st_gid;
unsigned int st_rdev;
off_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
off_t st_blksize;
off_t st_blocks;
long st_size;
long st_atime;
long st_mtime;
long st_ctime;
long st_blksize;
long st_blocks;
unsigned long __unused4[2];
};
......@@ -57,15 +57,15 @@ struct stat {
unsigned short st_uid;
unsigned short st_gid;
unsigned short st_rdev;
off_t st_size;
time_t st_atime;
long st_size;
long st_atime;
unsigned long st_atime_nsec;
time_t st_mtime;
long st_mtime;
unsigned long st_mtime_nsec;
time_t st_ctime;
long st_ctime;
unsigned long st_ctime_nsec;
off_t st_blksize;
off_t st_blocks;
long st_blksize;
long st_blocks;
unsigned long __unused4[2];
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment